Fork me on GitHub
  • API

    Show / Hide Table of Contents

    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>
    Inheritance
    object
    AbstractQueryConfig
    FieldConfig
    QueryConfigHandler
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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 null

    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 null

    Returns
    Type Description
    bool

    true if there is a value set with the given key, otherwise false

    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 null

    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 null

    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 value parameter. This parameter is passed uninitialized.

    Returns
    Type Description
    bool

    true if the configuration contains an element with the specified key; otherwise, false.

    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

    true if the key and value was set and removed, otherwise false

    Type Parameters
    Name Description
    T

    the value's type

    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.