Class Match


  • public class Match
    extends java.lang.Object
    A match
    Author:
    bratseth
    • Constructor Detail

      • Match

        public Match​(FlattenedItem item,
                     java.lang.String replaceValue)
        Creates a match
        Parameters:
        item - the match to add
        replaceValue - the string to replace this match by, usually the item.getIndexedString() which is what the replace value will be if it is passed as null here
    • Method Detail

      • getPosition

        public int getPosition()
      • getReplaceValue

        public java.lang.String getReplaceValue()
      • getParent

        public CompositeItem getParent()
        Returns the parent in which the item was matched, or null if the item was root. Note that the item may subsequently have been removed, so it does not necessarily have this parent
      • hashCode

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

        public Item toItem​(java.lang.String label)
        Returns a new item representing this match
      • equals

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