Class TermType

java.lang.Object
com.yahoo.prelude.query.TermType

public class TermType extends Object
A term type enumeration.
Author:
bratseth, Steinar Knutsen
  • Field Details

    • RANK

      public static final TermType RANK
    • AND

      public static final TermType AND
    • OR

      public static final TermType OR
    • NOT

      public static final TermType NOT
    • PHRASE

      public static final TermType PHRASE
    • EQUIV

      public static final TermType EQUIV
    • DEFAULT

      public static final TermType DEFAULT
    • name

      public final String name
  • Method Details

    • getName

      public String getName()
    • getItemClass

      public Class<? extends CompositeItem> getItemClass()
      Returns the CompositeItem type this type corresponds to, or CompositeItem if it's the default
    • hasItemClass

      public boolean hasItemClass(Class<?> theClass)
      Returns true if the class corresponding to this type is the given class
    • createItemClass

      public Item createItemClass()
      Returns an instance of the class corresponding to the given type, AndItem if this is the DEFAULT type
      Throws:
      RuntimeException - if an instance could not be created
    • toSign

      public String toSign()
    • toItemType

      public Item.ItemType toItemType()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object