Package de.xima.fc.bitflag
Class BitFlagSetPredicate
- java.lang.Object
 - 
- de.xima.fc.bitflag.BitFlagSetPredicate
 
 
- 
- All Implemented Interfaces:
 Serializable,LongPredicate
@Immutable public final class BitFlagSetPredicate extends Object implements Serializable, LongPredicate
Apredicatefor checking whether a bit flag includes or excludes some or all of a given set of flags.- Since:
 - 8.2.0
 - Author:
 - XIMA MEDIA GmbH
 - See Also:
 - Serialized Form
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBitFlagSetPredicate.BuilderBuilder for aBitFlagSetPredicate. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BitFlagSetPredicate.Builderbuilder()booleanequals(Object obj)static BitFlagSetPredicateequalTo(long flags)inthashCode()static BitFlagSetPredicatematchAll()static BitFlagSetPredicatematchNone()booleantest(long flag)- 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface java.util.function.LongPredicate
and, negate, or 
 - 
 
 - 
 
- 
- 
Method Detail
- 
test
public boolean test(long flag)
- Specified by:
 testin interfaceLongPredicate
 
- 
builder
public static BitFlagSetPredicate.Builder builder()
- Returns:
 - A builder for a 
BitFlagSetPredicate. By default, it includes no constraints.Buildingan empty builder is equivalent tomatchAll(). 
 
- 
equalTo
public static BitFlagSetPredicate equalTo(long flags)
- Parameters:
 flags- Types to match.- Returns:
 - A predicate that matches only the exact given value, i.e. when a flag include all of the given flags and excludes all other flags.
 
 
- 
matchAll
public static BitFlagSetPredicate matchAll()
- Returns:
 - A predicate that matches all flags.
 
 
- 
matchNone
public static BitFlagSetPredicate matchNone()
- Returns:
 - A predicate that matches no flags.
 
 
 - 
 
 -