Class Matching

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class Matching
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.Serializable
    Defines how a field should be matched. Matching objects can be compared based on their content, but they are not immutable.
    Author:
    bratseth
    See Also:
    Serialized Form
    • Constructor Detail

      • Matching

        public Matching()
        Creates a matching of type "text"
    • Method Detail

      • maxLength

        public java.lang.Integer maxLength()
      • maxLength

        public Matching maxLength​(int maxLength)
      • isTypeUserSet

        public boolean isTypeUserSet()
      • isAlgorithmUserSet

        public boolean isAlgorithmUserSet()
      • isPrefix

        public boolean isPrefix()
      • isSubstring

        public boolean isSubstring()
      • isSuffix

        public boolean isSuffix()
      • getGramSize

        public int getGramSize()
        Returns the gram size, or -1 if not set. Should only be set with gram matching.
      • setGramSize

        public void setGramSize​(int gramSize)
      • merge

        public void merge​(Matching m)
        Merge data from another matching object
      • getExactMatchTerminator

        public java.lang.String getExactMatchTerminator()
        If exact matching is used, this returns the terminator string which terminates an exact matched sequence in queries. If exact matching is not used, or no terminator is set, this is null
      • setExactMatchTerminator

        public void setExactMatchTerminator​(java.lang.String exactMatchTerminator)
        Sets the terminator string which terminates an exact matched sequence in queries (used if type is EXACT).
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clone

        public Matching clone()
        Overrides:
        clone in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object