public class TermType extends Object
Modifier and Type | Field and Description |
---|---|
static TermType |
AND |
static TermType |
DEFAULT |
private Class<? extends CompositeItem> |
instanceClass |
private Class<? extends CompositeItem> |
itemClass |
String |
name |
static TermType |
NOT |
static TermType |
OR |
static TermType |
PHRASE |
static TermType |
RANK |
private String |
sign |
Modifier | Constructor and Description |
---|---|
private |
TermType(String name,
Class<? extends CompositeItem> itemClass,
Class<? extends CompositeItem> instanceClass,
String sign) |
Modifier and Type | Method and Description |
---|---|
Item |
createItemClass()
Returns an instance of the class corresponding to the given type, AndItem
if this is the DEFAULT type
|
boolean |
equals(Object o) |
Class<? extends CompositeItem> |
getItemClass()
Returns the CompositeItem type this type corresponds to, or CompositeItem if it's the default
|
String |
getName() |
int |
hashCode() |
boolean |
hasItemClass(Class<?> theClass)
Returns true if the class corresponding to this type is the given class
|
String |
toSign() |
String |
toString() |
public static TermType RANK
public static TermType AND
public static TermType OR
public static TermType NOT
public static TermType PHRASE
public static TermType DEFAULT
public final String name
private final String sign
private final Class<? extends CompositeItem> instanceClass
private final Class<? extends CompositeItem> itemClass
private TermType(String name, Class<? extends CompositeItem> itemClass, Class<? extends CompositeItem> instanceClass, String sign)
public String getName()
public Class<? extends CompositeItem> getItemClass()
public boolean hasItemClass(Class<?> theClass)
public Item createItemClass()
RuntimeException
- if an instance could not be createdpublic String toSign()
Copyright © 2018. All rights reserved.