Interface PredicateUtils

  • All Known Implementing Classes:
    RoleScopeHelper

    public interface PredicateUtils
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static Predicate<String> containsMatchStringPredicate​(String regex)
      Given a regex string literal, compiles a regex pattern, and creates a string predicate that will test a string 'true' only iff the regex pattern matches any substring of the given string.
      static Predicate<String> containsMatchStringPredicate​(String regex, int flags)
      Given a regex string literal and regex flags, compiles a regex pattern, and creates a string predicate that will test a string 'true' only iff the regex pattern matches any substring of the given string.
      static Predicate<String> exactMatchStringPredicate​(String regex)
      Given a regex string literal, compiles a regex Pattern, and creates a String Predicate that will test a string 'true' only iff the regex pattern matches the whole string.
      static Predicate<String> exactMatchStringPredicate​(String regex, int flags)
      Given a regex string literal and regex flags, compiles a regex Pattern, and creates a String Predicate that will test a string 'true' only iff the regex pattern matches the whole string.
      static <T extends Tree>
      Predicate<T>
      treePredicate​(Predicate<String> stringPredicate)
      Given a string predicate creates a tree predicate that tests a tree 'true' only iff the string predicate tests tree's value 'true'
    • Method Detail

      • exactMatchStringPredicate

        static Predicate<String> exactMatchStringPredicate​(String regex)
        Given a regex string literal, compiles a regex Pattern, and creates a String Predicate that will test a string 'true' only iff the regex pattern matches the whole string.
      • exactMatchStringPredicate

        static Predicate<String> exactMatchStringPredicate​(String regex,
                                                           int flags)
        Given a regex string literal and regex flags, compiles a regex Pattern, and creates a String Predicate that will test a string 'true' only iff the regex pattern matches the whole string.
      • containsMatchStringPredicate

        static Predicate<String> containsMatchStringPredicate​(String regex)
        Given a regex string literal, compiles a regex pattern, and creates a string predicate that will test a string 'true' only iff the regex pattern matches any substring of the given string.
      • containsMatchStringPredicate

        static Predicate<String> containsMatchStringPredicate​(String regex,
                                                              int flags)
        Given a regex string literal and regex flags, compiles a regex pattern, and creates a string predicate that will test a string 'true' only iff the regex pattern matches any substring of the given string.
      • treePredicate

        static <T extends TreePredicate<T> treePredicate​(Predicate<String> stringPredicate)
        Given a string predicate creates a tree predicate that tests a tree 'true' only iff the string predicate tests tree's value 'true'