|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.util.AttributeSource org.apache.lucene.queryParser.core.config.AbstractQueryConfig
public abstract class AbstractQueryConfig
This class is the base of QueryConfigHandler
and FieldConfig
.
It has operations to set, unset and get configuration values.
Each configuration is is a key->value pair. The key should be an unique
ConfigurationKey
instance and it also holds the value's type.
AttributeSource
ConfigurationKey
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource |
---|
AttributeSource.AttributeFactory, AttributeSource.State |
Method Summary | ||
---|---|---|
|
addAttribute(Class<A> attClass)
The caller must pass in a Class<? extends Attribute> value. |
|
|
get(ConfigurationKey<T> key)
Returns the value held by the given key. |
|
|
get(ConfigurationKey<T> key,
T defaultValue)
Returns the value held by the given key or the given default value if the key is not found. |
|
|
has(ConfigurationKey<T> key)
Returns true if there is a value set with the given key, otherwise false. |
|
|
set(ConfigurationKey<T> key,
T value)
Sets a key and its value. |
|
|
unset(ConfigurationKey<T> key)
Unsets the given key and its value. |
Methods inherited from class org.apache.lucene.util.AttributeSource |
---|
addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public <T> T get(ConfigurationKey<T> key)
T
- the value's typekey
- the key, cannot be null
public <T> T get(ConfigurationKey<T> key, T defaultValue)
T
- the value's typekey
- the key, cannot be null
defaultValue
- the default value
public <T> boolean has(ConfigurationKey<T> key)
T
- @param key
- the key, cannot be null
public <T> void set(ConfigurationKey<T> key, T value)
T
- the value's typekey
- the key, cannot be null
value
- public <A extends Attribute> A addAttribute(Class<A> attClass)
AttributeSource
addAttribute
in class AttributeSource
public <T> boolean unset(ConfigurationKey<T> key)
T
- the value's typekey
- the key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |