Package net.sf.saxon.z
Class IntSetPredicate
- java.lang.Object
-
- net.sf.saxon.z.IntSetPredicate
-
- All Implemented Interfaces:
java.util.function.IntPredicate
public class IntSetPredicate extends java.lang.Object implements java.util.function.IntPredicateAn implementation of IntPredicate that tests whether a given integer is a member of some IntSet
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.IntPredicateALWAYS_FALSEConvenience predicate that never matchesstatic java.util.function.IntPredicateALWAYS_TRUEConvenience predicate that always matches
-
Constructor Summary
Constructors Constructor Description IntSetPredicate(IntSet set)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntSetgetIntSet()Get the underlying IntSetjava.util.function.IntPredicateor(java.util.function.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 predicatejava.lang.StringtoString()Get string representation
-
-
-
Constructor Detail
-
IntSetPredicate
public IntSetPredicate(IntSet set)
-
-
Method Detail
-
test
public boolean test(int value)
Ask whether a given value matches this predicate- Specified by:
testin interfacejava.util.function.IntPredicate- Parameters:
value- the value to be tested- Returns:
- true if the value matches; false if it does not
-
or
public java.util.function.IntPredicate or(java.util.function.IntPredicate other)
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 interfacejava.util.function.IntPredicate- 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:
java.lang.NullPointerException- if other is null
-
getIntSet
public IntSet getIntSet()
Get the underlying IntSet- Returns:
- the underlying IntSet
-
toString
public java.lang.String toString()
Get string representation- Overrides:
toStringin classjava.lang.Object
-
-