Interface DoublePredicate
-
- All Superinterfaces:
java.util.function.DoublePredicate,java.util.function.Predicate<java.lang.Double>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface DoublePredicate extends java.util.function.Predicate<java.lang.Double>, java.util.function.DoublePredicateA type-specificPredicate; provides methods to test a primitive type both as object and as primitive.Except for the boolean case, this interface extends both a parameterized
Predicateand a type-specific JDK predicate (e.g.,IntPredicate). For types missing a type-specific JDK predicate (e.g.,shortorfloat), we extend the predicate associated with the smallest primitive type that can represent the current type (e.g.,intordouble, respectively).- Since:
- 8.5.0
- See Also:
Predicate
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default DoublePredicateand(DoublePredicate other)Returns a composed type-specific predicate that represents a short-circuiting logical AND of this type-specific predicate and another.default DoublePredicateand(java.util.function.DoublePredicate other)Returns a composed type-specific predicate that represents a short-circuiting logical AND of this type-specific predicate and another.default java.util.function.Predicate<java.lang.Double>and(java.util.function.Predicate<? super java.lang.Double> other)Deprecated.Please use the corresponding type-specific method instead.default DoublePredicatenegate()default DoublePredicateor(DoublePredicate other)Returns a composed type-specific predicate that represents a short-circuiting logical OR of this type-specific predicate and another.default DoublePredicateor(java.util.function.DoublePredicate other)Returns a composed type-specific predicate that represents a short-circuiting logical OR of this type-specific predicate and another.default java.util.function.Predicate<java.lang.Double>or(java.util.function.Predicate<? super java.lang.Double> other)Deprecated.Please use the corresponding type-specific method instead.default booleantest(java.lang.Double t)Deprecated.Please use the corresponding type-specific method instead.
-
-
-
Method Detail
-
test
@Deprecated default boolean test(java.lang.Double t)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
testin interfacejava.util.function.Predicate<java.lang.Double>
-
and
default DoublePredicate and(java.util.function.DoublePredicate other)
Returns a composed type-specific predicate that represents a short-circuiting logical AND of this type-specific predicate and another.- Specified by:
andin interfacejava.util.function.DoublePredicate- Parameters:
other- a predicate that will be logically-ANDed with this predicate.- Returns:
- a composed predicate that represents the short-circuiting logical
AND of this predicate and the
otherpredicate. - See Also:
Predicate.and(java.util.function.Predicate<? super T>)- API Notes:
- Implementing classes should generally override this method and keep the default implementation of the other overloads, which will delegate to this method (after proper conversions).
-
and
default DoublePredicate and(DoublePredicate other)
Returns a composed type-specific predicate that represents a short-circuiting logical AND of this type-specific predicate and another.WARNING: Overriding this method is almost always a mistake, as this overload only exists to disambiguate. Instead, override the
and()overload that uses the JDK's primitive predicate type (e.g.IntPredicate).If Java supported final default methods, this would be one, but sadly it does not.
If you checked and are overriding the version with
java.util.function.XPredicate, and you still see this warning, then your IDE is incorrectly conflating this method with the proper method to override, and you can safely ignore this message.- Parameters:
other- a predicate that will be logically-ANDed with this predicate.- Returns:
- a composed predicate that represents the short-circuiting logical
AND of this predicate and the
otherpredicate. - See Also:
Predicate.and(java.util.function.Predicate<? super T>)
-
and
@Deprecated default java.util.function.Predicate<java.lang.Double> and(java.util.function.Predicate<? super java.lang.Double> other)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
andin interfacejava.util.function.Predicate<java.lang.Double>
-
negate
default DoublePredicate negate()
- Specified by:
negatein interfacejava.util.function.DoublePredicate- Specified by:
negatein interfacejava.util.function.Predicate<java.lang.Double>
-
or
default DoublePredicate or(java.util.function.DoublePredicate other)
Returns a composed type-specific predicate that represents a short-circuiting logical OR of this type-specific predicate and another.- Specified by:
orin interfacejava.util.function.DoublePredicate- Parameters:
other- a predicate that will be logically-ORed with this predicate.- Returns:
- a composed predicate that represents the short-circuiting logical
OR of this predicate and the
otherpredicate. - See Also:
Predicate.or(java.util.function.Predicate<? super T>)- API Notes:
- Implementing classes should generally override this method and keep the default implementation of the other overloads, which will delegate to this method (after proper conversions).
-
or
default DoublePredicate or(DoublePredicate other)
Returns a composed type-specific predicate that represents a short-circuiting logical OR of this type-specific predicate and another.WARNING: Overriding this method is almost always a mistake, as this overload only exists to disambiguate. Instead, override the
or()overload that uses the JDK's primitive predicate type (e.g.IntPredicate).If Java supported final default methods, this would be one, but sadly it does not.
If you checked and are overriding the version with
java.util.function.XPredicate, and you still see this warning, then your IDE is incorrectly conflating this method with the proper method to override, and you can safely ignore this message.- Parameters:
other- a predicate that will be logically-ORed with this predicate.- Returns:
- a composed predicate that represents the short-circuiting logical
OR of this predicate and the
otherpredicate. - See Also:
Predicate.or(java.util.function.Predicate<? super T>)
-
or
@Deprecated default java.util.function.Predicate<java.lang.Double> or(java.util.function.Predicate<? super java.lang.Double> other)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
orin interfacejava.util.function.Predicate<java.lang.Double>
-
-