Package com.yahoo.prelude.query
Class TermType
- java.lang.Object
-
- com.yahoo.prelude.query.TermType
-
public class TermType extends Object
A term type enumeration- Author:
- bratseth, Steinar Knutsen
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Item
createItemClass()
Returns an instance of the class corresponding to the given type, AndItem if this is the DEFAULT typeboolean
equals(Object o)
Class<? extends CompositeItem>
getItemClass()
Returns the CompositeItem type this type corresponds to, or CompositeItem if it's the defaultString
getName()
int
hashCode()
boolean
hasItemClass(Class<?> theClass)
Returns true if the class corresponding to this type is the given classString
toSign()
String
toString()
-
-
-
Field Detail
-
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 Detail
-
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()
-
-