@FunctionalInterface
public interface LongPredicate
extends java.util.function.Predicate<java.lang.Long>, java.util.function.LongPredicate
Predicate
; provides methods to test a primitive type both as object
and as primitive.
Except for the boolean case, this interface extends both a parameterized Predicate
and a type-specific JDK predicate (e.g., IntPredicate
). For types missing
a type-specific JDK predicate (e.g., short
or float
), we extend the predicate associated with
the smallest primitive type that can represent the current type (e.g., int
or double
, respectively).
Predicate
Modifier and Type | Method and Description |
---|---|
default LongPredicate |
and(java.util.function.LongPredicate other)
Returns a composed type-specific predicate that represents a short-circuiting logical
AND of this type-specific predicate and another.
|
default LongPredicate |
and(LongPredicate 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.Long> |
and(java.util.function.Predicate<? super java.lang.Long> other)
Deprecated.
Please use the corresponding type-specific method instead.
|
default LongPredicate |
negate() |
default LongPredicate |
or(java.util.function.LongPredicate other)
Returns a composed type-specific predicate that represents a short-circuiting logical
OR of this type-specific predicate and another.
|
default LongPredicate |
or(LongPredicate 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.Long> |
or(java.util.function.Predicate<? super java.lang.Long> other)
Deprecated.
Please use the corresponding type-specific method instead.
|
default boolean |
test(java.lang.Long t)
Deprecated.
Please use the corresponding type-specific method instead.
|
@Deprecated default boolean test(java.lang.Long t)
test
in interface java.util.function.Predicate<java.lang.Long>
default LongPredicate and(java.util.function.LongPredicate other)
and
in interface java.util.function.LongPredicate
other
- a predicate that will be logically-ANDed with this predicate.other
predicate.Predicate.and(java.util.function.Predicate<? super T>)
default LongPredicate and(LongPredicate other)
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.
other
- a predicate that will be logically-ANDed with this predicate.other
predicate.Predicate.and(java.util.function.Predicate<? super T>)
@Deprecated default java.util.function.Predicate<java.lang.Long> and(java.util.function.Predicate<? super java.lang.Long> other)
and
in interface java.util.function.Predicate<java.lang.Long>
default LongPredicate negate()
negate
in interface java.util.function.LongPredicate
negate
in interface java.util.function.Predicate<java.lang.Long>
default LongPredicate or(java.util.function.LongPredicate other)
or
in interface java.util.function.LongPredicate
other
- a predicate that will be logically-ORed with this predicate.other
predicate.Predicate.or(java.util.function.Predicate<? super T>)
default LongPredicate or(LongPredicate other)
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.
other
- a predicate that will be logically-ORed with this predicate.other
predicate.Predicate.or(java.util.function.Predicate<? super T>)
@Deprecated default java.util.function.Predicate<java.lang.Long> or(java.util.function.Predicate<? super java.lang.Long> other)
or
in interface java.util.function.Predicate<java.lang.Long>