Interface StringMatchBuilder<T extends DataObject>

Type Parameters:
T - query result type
All Superinterfaces:
ValueMatchBuilder<T,String>

@Beta public interface StringMatchBuilder<T extends DataObject> extends ValueMatchBuilder<T,String>
Builder for a match of a String leaf value.
  • Method Details

    • startsWith

      @NonNull ValueMatch<T> startsWith(String str)
      Match if the leaf exists and its value starts with specified string, i.e. its String.startsWith(String) would return true.
      Parameters:
      str - string to match as prefix
      Returns:
      A ValueMatch
      Throws:
      NullPointerException - if str is null
    • endsWith

      @NonNull ValueMatch<T> endsWith(String str)
      Match if the leaf exists and its value ends with specified string. i.e. its String.endsWith(String) would return true.
      Parameters:
      str - string to match as suffix
      Returns:
      A ValueMatch
      Throws:
      NullPointerException - if str is null
    • contains

      @NonNull ValueMatch<T> contains(String str)
      Match if the leaf exists and its value contains specified string, i.e. its String.contains(CharSequence) would return true.
      Parameters:
      str - the string to search for
      Returns:
      A ValueMatch
      Throws:
      NullPointerException - if str is null
    • matchesPattern

      @NonNull ValueMatch<T> matchesPattern(Pattern pattern)
      Match if the leaf exists and its value matches with specified pattern.
      Parameters:
      pattern - pattern to check against
      Returns:
      A ValueMatch
      Throws:
      NullPointerException - if pattern is null