Class SetPredicate

java.lang.Object
overit.geocall.util.SetPredicate
All Implemented Interfaces:
Serializable, Predicate<Set<String>>

public class SetPredicate extends Object implements Predicate<Set<String>>, Serializable
See Also:
  • Field Details

  • Constructor Details

    • SetPredicate

      protected SetPredicate(overit.geocall.util.SetPredicate.Token t)
    • SetPredicate

      protected SetPredicate(overit.geocall.util.SetPredicate.Token t, SetPredicate expr)
    • SetPredicate

      protected SetPredicate(overit.geocall.util.SetPredicate.Token t, SetPredicate left, SetPredicate right)
  • Method Details

    • parseOrDefault

      public static SetPredicate parseOrDefault(String s, SetPredicate def)
    • parse

      public static SetPredicate parse(String expression)
      Parses the input expression returning a SetPredicate. 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

      public boolean test(Set<String> rules)
      Tests a SetPredicate object against a set of strings.
      Specified by:
      test in interface Predicate<Set<String>>
      Parameters:
      rules - the input set which has to contain the SetPredicate token value
      Returns:
      true if the given set contains the SetPredicate token value
    • test

      public boolean test(SupplierChain<String,Boolean> supplierChain)
      Tests a SetPredicate object against a SupplierChain
      Parameters:
      supplierChain - the supplierChain provided to test the SetPredicate
      Returns:
      true or false if at least one of the SupplierChain.Handler provided by the supplierChain is able to handle the request
    • test

      public boolean test()
      Tests a SetPredicate object against the VerificationChain handlers.
      Returns:
      true or false if at least one of the SupplierChain.Handler provided by the VerificationChain is able to handle the request
    • toString

      public String toString()
      Overrides:
      toString in class Object