Class PureWeightedString

All Implemented Interfaces:
Cloneable

public class PureWeightedString extends PureWeightedItem
A word item which only consists of a value and weight.
Author:
baldersheim
  • Constructor Details

    • PureWeightedString

      public PureWeightedString(String value)
    • PureWeightedString

      public PureWeightedString(String value, int weight)
  • Method Details

    • getItemType

      public Item.ItemType getItemType()
      Description copied from class: Item
      Return the enumerated type of this item.
      Specified by:
      getItemType in class Item
    • encodeThis

      protected void encodeThis(ByteBuffer buffer)
      Overrides:
      encodeThis in class Item
    • getTermCount

      public int getTermCount()
      Specified by:
      getTermCount in class Item
    • appendBodyString

      protected void appendBodyString(StringBuilder buffer)
      Description copied from class: Item
      Override to append the item body in the canonical query language of this item. An item is usually represented by the string
       ([itemName] [body])
       
      The body must be appended appended by this method.
      Overrides:
      appendBodyString in class PureWeightedItem
    • getString

      public String getString()
    • equals

      public boolean equals(Object other)
      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 Item
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Item
    • disclose

      public void disclose(Discloser discloser)
      Overrides:
      disclose in class PureWeightedItem