Interface LikeOperator<R>

Type Parameters:
R - the type of resources (e.g. Feature) to filter.
All Superinterfaces:
ComparisonOperator<R>, Filter<R>, Predicate<R>

@UML(identifier="LikeOperator", specification=ISO_19143) public interface LikeOperator<R> extends ComparisonOperator<R>
A character string comparison operator with pattern matching. LikeOperator performs the equivalent of the SQL "LIKE" operator on properties of a feature. The pattern contains a combination of regular characters, the wildcard character, the single character, and the escape character. The wildcard character matches zero or more characters. The single character matches exactly one character. The escape character is used to escape the meaning of the wildcard, single character and escape character itself.
Since:
3.1
  • Method Summary

    Modifier and Type
    Method
    Description
    default char
    Returns the character that can be used in the pattern to prefix one of the wild card characters to indicate that it should be matched literally in the content of the feature's property.
    List<Expression<? super R,?>>
    Returns the expression whose values will be compared by this operator, together with the pattern.
    Returns the nature of the comparison.
    default char
    Returns the character that can be used in the pattern to match exactly one character.
    default char
    Returns the character that can be used in the pattern to match any sequence of characters.
    default boolean
    Specifies how a filter expression processor should perform string comparisons.

    Methods inherited from interface Filter

    test

    Methods inherited from interface Predicate

    and, negate, or
  • Method Details

    • getOperatorType

      default ComparisonOperatorName getOperatorType()
      Returns the nature of the comparison. The default implementation returns PROPERTY_IS_LIKE.
      Specified by:
      getOperatorType in interface ComparisonOperator<R>
      Specified by:
      getOperatorType in interface Filter<R>
      Returns:
      the nature of the comparison.
    • getExpressions

      @UML(identifier="expression", obligation=MANDATORY, specification=ISO_19143) List<Expression<? super R,?>> getExpressions()
      Returns the expression whose values will be compared by this operator, together with the pattern. The list content is as below:
      1. The first expression provides the values to compare. It should evaluate to a character string.
      2. The second expression is the pattern. It is often specified in a Literal with a value which is a combination of regular characters, the wildcard character, the single character, and the escape character.
      Specified by:
      getExpressions in interface Filter<R>
      Returns:
      a list of size 2 containing the expression to be compared and the pattern, in that order.
    • getWildCard

      @UML(identifier="wildCard", obligation=MANDATORY, specification=ISO_19143) default char getWildCard()
      Returns the character that can be used in the pattern to match any sequence of characters. The default value is the "%" character.
      Returns:
      the character for matching zero or more characters.
    • getSingleChar

      @UML(identifier="singleChar", obligation=MANDATORY, specification=ISO_19143) default char getSingleChar()
      Returns the character that can be used in the pattern to match exactly one character. The default value is the "_" character.
      Returns:
      the character for matching exactly one character.
    • getEscapeChar

      @UML(identifier="escapeChar", obligation=MANDATORY, specification=ISO_19143) default char getEscapeChar()
      Returns the character that can be used in the pattern to prefix one of the wild card characters to indicate that it should be matched literally in the content of the feature's property. The default value is the "\" character.
      Returns:
      the character for escaping a wildcard character.
    • isMatchingCase

      default boolean isMatchingCase()
      Specifies how a filter expression processor should perform string comparisons. A value of true means that string comparisons shall match case. The value false means that string comparisons are performed caselessly. The default value true.
      Returns:
      true if comparisons are case sensitive, otherwise false.