An AttributeSource contains a list of different {@link AttributeImpl}s, and methods to add and get them. There can only be a single instance of an attribute in the same AttributeSource instance. This is ensured by passing in the actual type of the Attribute (Class<Attribute>) to the {@link #AddAttribute(Class)}, which then checks if an instance of that type is already present. If yes, it returns the instance, otherwise it creates a new instance and returns it.

Namespace: Lucene.Net.Util
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public class AttributeSource
Visual Basic
Public Class AttributeSource
Visual C++
public ref class AttributeSource

Inheritance Hierarchy

System..::..Object
  Lucene.Net.Util..::..AttributeSource
    Lucene.Net.Analysis..::..TokenStream

See Also