Package net.sf.saxon.z
Class IntSetPredicate
java.lang.Object
net.sf.saxon.z.IntSetPredicate
- All Implemented Interfaces:
IntPredicate
An implementation of IntPredicate that tests whether a given integer is a member
of some IntSet
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntPredicateConvenience predicate that never matchesstatic final IntPredicateConvenience predicate that always matches -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the underlying IntSetor(IntPredicate other) Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another.booleantest(int value) Ask whether a given value matches this predicatetoString()Get string representationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.function.IntPredicate
and, negate
-
Field Details
-
ALWAYS_TRUE
Convenience predicate that always matches -
ALWAYS_FALSE
Convenience predicate that never matches
-
-
Constructor Details
-
IntSetPredicate
-
-
Method Details
-
test
public boolean test(int value) Ask whether a given value matches this predicate- Specified by:
testin interfaceIntPredicate- Parameters:
value- the value to be tested- Returns:
- true if the value matches; false if it does not
-
or
Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another. When evaluating the composed predicate, if this predicate istrue, then theotherpredicate is not evaluated.Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this predicate throws an exception, the
otherpredicate will not be evaluated.- Specified by:
orin interfaceIntPredicate- 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 - Throws:
NullPointerException- if other is null
-
getIntSet
Get the underlying IntSet- Returns:
- the underlying IntSet
-
toString
Get string representation
-