NotPredicate.java revision 2289:1c9b94ce045e
123353Sdfr/* 223353Sdfr * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. 323353Sdfr * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 423353Sdfr * 523353Sdfr * This code is free software; you can redistribute it and/or modify it 623353Sdfr * under the terms of the GNU General Public License version 2 only, as 723353Sdfr * published by the Free Software Foundation. 823353Sdfr * 923353Sdfr * This code is distributed in the hope that it will be useful, but WITHOUT 1023353Sdfr * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1123353Sdfr * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1223353Sdfr * version 2 for more details (a copy is included in the LICENSE file that 1323353Sdfr * accompanied this code). 1423353Sdfr * 1523353Sdfr * You should have received a copy of the GNU General Public License version 1623353Sdfr * 2 along with this work; if not, write to the Free Software Foundation, 1723353Sdfr * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1823353Sdfr * 1923353Sdfr * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2023353Sdfr * or visit www.oracle.com if you need additional information or have any 2123353Sdfr * questions. 2223353Sdfr */ 2323353Sdfr 2423353Sdfrpackage jdk.test.lib.cli.predicate; 2523353Sdfr 2623353Sdfrimport java.util.function.BooleanSupplier; 2723353Sdfr 2823353Sdfrpublic class NotPredicate implements BooleanSupplier { 2950476Speter private final BooleanSupplier s; 3023353Sdfr 3148368Skris public NotPredicate(BooleanSupplier s) { 32206622Suqs this.s = s; 3323353Sdfr } 3423353Sdfr 3523353Sdfr @Override 3623353Sdfr public boolean getAsBoolean() { 3723353Sdfr return !s.getAsBoolean(); 3884306Sru } 3984306Sru} 4084306Sru