Class Match


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

      • Match

        public Match​(FlattenedItem item,
                     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 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
      • toItem

        public Item toItem​(String label)
        Returns a new item representing this match
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object