Class AbstractQueryConfig
java.lang.Object
org.apache.lucene.queryparser.flexible.core.config.AbstractQueryConfig
- Direct Known Subclasses:
FieldConfig,QueryConfigHandler
This class is the base of
QueryConfigHandler and FieldConfig. It has operations
to set, unset and get configuration values.
Each configuration is a key->value pair. The key should be a unique ConfigurationKey instance, and it also holds the value's type.
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> Tget(ConfigurationKey<T> key) Returns the value held by the given key.<T> booleanhas(ConfigurationKey<T> key) Returns true if there is a value set with the given key, otherwise false.<T> voidset(ConfigurationKey<T> key, T value) Sets a key and its value.<T> booleanunset(ConfigurationKey<T> key) Unsets the given key and its value.
-
Method Details
-
get
Returns the value held by the given key.- Type Parameters:
T- the value's type- Parameters:
key- the key, cannot benull- Returns:
- the value held by the given key
-
has
Returns true if there is a value set with the given key, otherwise false.- Type Parameters:
T- the value's type- Parameters:
key- the key, cannot benull- Returns:
- true if there is a value set with the given key, otherwise false
-
set
Sets a key and its value.- Type Parameters:
T- the value's type- Parameters:
key- the key, cannot benullvalue- value to set
-
unset
Unsets the given key and its value.- Type Parameters:
T- the value's type- Parameters:
key- the key- Returns:
- true if the key and value was set and removed, otherwise false
-