Package overit.geocall.util
Class SetPredicate
java.lang.Object
overit.geocall.util.SetPredicate
- All Implemented Interfaces:
Serializable,Predicate<Set<String>>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final SetPredicatestatic final Stringstatic final Stringprotected final SetPredicatestatic final Stringstatic final Stringprotected final SetPredicateprotected final overit.geocall.util.SetPredicate.Tokenstatic final SetPredicatestatic final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSetPredicate(overit.geocall.util.SetPredicate.Token t) protectedSetPredicate(overit.geocall.util.SetPredicate.Token t, SetPredicate expr) protectedSetPredicate(overit.geocall.util.SetPredicate.Token t, SetPredicate left, SetPredicate right) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidconsume(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos, overit.geocall.util.SetPredicate.TokenType type) static SetPredicateParses the input expression returning aSetPredicate.protected static SetPredicateparse(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos) protected static SetPredicateparseAnd(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos) protected static SetPredicateparseLit(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos) protected static SetPredicateparseNot(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos) protected static SetPredicateparseOr(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos) static SetPredicateparseOrDefault(String s, SetPredicate def) protected static SetPredicateparsePar(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos) booleantest()Tests a SetPredicate object against theVerificationChainhandlers.booleanTests a SetPredicate object against a set of strings.booleantest(SupplierChain<String, Boolean> supplierChain) Tests a SetPredicate object against aSupplierChaintoString()
-
Field Details
-
TRUE
-
FALSE
-
AND_FORMAT
- See Also:
-
OR_FORMAT
- See Also:
-
NOT_FORMAT
- See Also:
-
IN_SQUARE_BRACKETS_FORMAT
- See Also:
-
TRUE_UPPERCASE
-
FALSE_UPPERCASE
-
token
protected final overit.geocall.util.SetPredicate.Token token -
left
-
right
-
-
Constructor Details
-
SetPredicate
protected SetPredicate(overit.geocall.util.SetPredicate.Token t) -
SetPredicate
-
SetPredicate
protected SetPredicate(overit.geocall.util.SetPredicate.Token t, SetPredicate left, SetPredicate right)
-
-
Method Details
-
parseOrDefault
-
parse
Parses the input expression returning aSetPredicate. The input expression can be expressed in the following form: "(!foo.bar&zoo.zii)|lorem.ipsum" but also in the following java-like form: "(!foo.bar && zoo.zii) || lorem.ipsum"- Parameters:
expression- the logical expression to be parsed- Returns:
- the resulting
SetPredicate
-
parse
protected static SetPredicate parse(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos) -
parseOr
protected static SetPredicate parseOr(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos) -
parseAnd
protected static SetPredicate parseAnd(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos) -
parseNot
protected static SetPredicate parseNot(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos) -
parsePar
protected static SetPredicate parsePar(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos) -
parseLit
protected static SetPredicate parseLit(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos) -
consume
protected static void consume(List<overit.geocall.util.SetPredicate.Token> tokens, overit.geocall.util.SetPredicate.Position pos, overit.geocall.util.SetPredicate.TokenType type) -
test
Tests a SetPredicate object against a set of strings. -
test
Tests a SetPredicate object against aSupplierChain- Parameters:
supplierChain- the supplierChain provided to test the SetPredicate- Returns:
- true or false if at least one of the
SupplierChain.Handlerprovided by the supplierChain is able to handle the request
-
test
public boolean test()Tests a SetPredicate object against theVerificationChainhandlers.- Returns:
- true or false if at least one of the
SupplierChain.Handlerprovided by theVerificationChainis able to handle the request
-
toString
-