Package io.permazen.kv
Class KeyFilterUtil
java.lang.Object
io.permazen.kv.KeyFilterUtil
Utility methods for dealing with
KeyFilter
s.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic KeyFilter
intersection
(KeyFilter... keyFilters) Create aKeyFilter
that represents the intersection of the given instances.static boolean
Determine if the given instance is empty, i.e., contains no keys.static KeyFilter
Create aKeyFilter
that represents the union of the given instances.
-
Method Details
-
union
Create aKeyFilter
that represents the union of the given instances.- Parameters:
keyFilters
- instances to unify- Returns:
- the union of the given
keyFilters
- Throws:
IllegalArgumentException
- ifkeyFilters
is emptyIllegalArgumentException
- ifkeyFilters
or any element inkeyFilters
is null
-
intersection
Create aKeyFilter
that represents the intersection of the given instances.- Parameters:
keyFilters
- instances to intersect- Returns:
- the intersection of the given
keyFilters
- Throws:
IllegalArgumentException
- ifkeyFilters
is emptyIllegalArgumentException
- ifkeyFilters
or any element inkeyFilters
is null
-
isEmpty
Determine if the given instance is empty, i.e., contains no keys.- Parameters:
keyFilter
- instance to check- Returns:
- true if filter is empty
- Throws:
IllegalArgumentException
- ifkeyFilter
is null
-