Class BoolItem

    • Constructor Detail

      • BoolItem

        public BoolItem​(boolean value)
      • BoolItem

        public BoolItem​(boolean value,
                        java.lang.String indexName)
      • BoolItem

        public BoolItem​(boolean value,
                        java.lang.String indexName,
                        boolean isFromQuery)
    • Method Detail

      • getItemType

        public Item.ItemType getItemType()
        Returns ItemType.WORD as we do not want a string binding from the parsed query to index types
        Specified by:
        getItemType in class Item
      • getName

        public java.lang.String getName()
        Description copied from class: Item
        Returns the name of this item
        Specified by:
        getName in class Item
      • value

        public boolean value()
      • stringValue

        public java.lang.String stringValue()
        Returns "true" or "false"
      • setValue

        public void setValue​(boolean value)
      • setValue

        public void setValue​(java.lang.String stringValue)
        Sets the value from a string
        Specified by:
        setValue in class TermItem
        Parameters:
        stringValue - "true" or "false"
        Throws:
        java.lang.IllegalArgumentException - if the given value is not equal to "true" nor "false" (ignoring case)
      • isStemmed

        public boolean isStemmed()
      • appendHeadingString

        protected void appendHeadingString​(java.lang.StringBuilder buffer)
        Word items uses a empty heading instead of "WORD "
        Overrides:
        appendHeadingString in class Item
      • equals

        public boolean equals​(java.lang.Object object)
        Description copied from class: Item
        Returns whether this item is of the same class and contains the same state as the given item
        Overrides:
        equals in class SimpleIndexedItem
      • getNumWords

        public int getNumWords()
        Returns:
        how many phrase words does this item contain
      • getIndexedString

        public java.lang.String getIndexedString()
        Description copied from interface: IndexedItem
        Return the searchable term contents of this item.
        Specified by:
        getIndexedString in interface IndexedItem
        Specified by:
        getIndexedString in class SimpleIndexedItem
        Returns:
        a string representation of what is presumably stored in an index which will match this item
      • isWords

        public boolean isWords()
        Returns true if this consists of regular word characters. Returns false if this represents a "special token"
        Specified by:
        isWords in interface BlockItem
        Specified by:
        isWords in class TermItem