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<T> instance and it also holds the value's type.
ConfigurationKey<T>Inherited Members
Namespace: Lucene.Net.QueryParsers.Flexible.Core.Config
Assembly: Lucene.Net.QueryParser.dll
Syntax
public abstract class AbstractQueryConfig
Methods
Get<T>(ConfigurationKey<T>)
Returns the value held by the given key.
Declaration
public virtual T Get<T>(ConfigurationKey<T> key)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationKey<T> | key | the key, cannot be |
Returns
Type | Description |
---|---|
T | the value held by the given key |
Type Parameters
Name | Description |
---|---|
T | the value's type |
Has<T>(ConfigurationKey<T>)
Returns true
if there is a value set with the given key, otherwise false
.
Declaration
public virtual bool Has<T>(ConfigurationKey<T> key)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationKey<T> | key | the key, cannot be |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | the value's type |
Set<T>(ConfigurationKey<T>, T)
Sets a key and its value.
Declaration
public virtual void Set<T>(ConfigurationKey<T> key, T value)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationKey<T> | key | the key, cannot be |
T | value | value to set |
Type Parameters
Name | Description |
---|---|
T | the value's type |
TryGetValue<T>(ConfigurationKey<T>, out T)
Gets the value associated with the specified key.
Declaration
public virtual bool TryGetValue<T>(ConfigurationKey<T> key, out T value)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationKey<T> | key | the key, cannot be |
T | value | When this method returns, contains the value associated with the specified key,
if the key is found; otherwise, the default value for the type of the |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | the value's type |
Unset<T>(ConfigurationKey<T>)
Unsets the given key and its value.
Declaration
public virtual bool Unset<T>(ConfigurationKey<T> key)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationKey<T> | key | the key |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | the value's type |