Lucene.Net  3.0.3
Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
Public Member Functions | List of all members
Lucene.Net.Util.Attribute Class Referenceabstract

Base class for Attributes that can be added to a Lucene.Net.Util.AttributeSource. Attributes are used to add data in a dynamic, yet type-safe way to a source of usually streamed objects, e. g. a Lucene.Net.Analysis.TokenStream. More...

Inherits ICloneable, and Lucene.Net.Util.IAttribute.

Inherited by Lucene.Net.Analysis.Token, and Lucene.Net.Analysis.Tokenattributes.FlagsAttribute.

Public Member Functions

abstract void Clear ()
 Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.
 
override System.String ToString ()
 The default implementation of this method accesses all declared fields of this object and prints the values in the following syntax:
 
abstract override int GetHashCode ()
 Subclasses must implement this method and should compute a hashCode similar to this:
 
abstract override bool Equals (System.Object other)
 All values used for computation of GetHashCode() should be checked here for equality.
 
abstract void CopyTo (Attribute target)
 Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.
 
virtual System.Object Clone ()
 Shallow clone. Subclasses must override this if they need to clone any members deeply,
 

Detailed Description

Base class for Attributes that can be added to a Lucene.Net.Util.AttributeSource.

Attributes are used to add data in a dynamic, yet type-safe way to a source of usually streamed objects, e. g. a Lucene.Net.Analysis.TokenStream.

Definition at line 30 of file Attribute.cs.

Member Function Documentation

abstract void Lucene.Net.Util.Attribute.Clear ( )
pure virtual

Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Implemented in Lucene.Net.Analysis.Token, and Lucene.Net.Analysis.Tokenattributes.FlagsAttribute.

virtual System.Object Lucene.Net.Util.Attribute.Clone ( )
virtual

Shallow clone. Subclasses must override this if they need to clone any members deeply,

Reimplemented in Lucene.Net.Analysis.Token, and Lucene.Net.Analysis.Tokenattributes.FlagsAttribute.

Definition at line 117 of file Attribute.cs.

abstract void Lucene.Net.Util.Attribute.CopyTo ( Attribute  target)
pure virtual

Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Implemented in Lucene.Net.Analysis.Token, and Lucene.Net.Analysis.Tokenattributes.FlagsAttribute.

abstract override bool Lucene.Net.Util.Attribute.Equals ( System.Object  other)
pure virtual

All values used for computation of GetHashCode() should be checked here for equality.

see also Object.Equals(Object)

Implemented in Lucene.Net.Analysis.Tokenattributes.FlagsAttribute.

abstract override int Lucene.Net.Util.Attribute.GetHashCode ( )
pure virtual

Subclasses must implement this method and should compute a hashCode similar to this:

public int hashCode() { int code = startOffset; code = code * 31 + endOffset; return code; }

see also Equals(Object)

Implemented in Lucene.Net.Analysis.Token, and Lucene.Net.Analysis.Tokenattributes.FlagsAttribute.

override System.String Lucene.Net.Util.Attribute.ToString ( )

The default implementation of this method accesses all declared fields of this object and prints the values in the following syntax:

public String toString() { return "start=" + startOffset + ",end=" + endOffset; }

This method may be overridden by subclasses.

Definition at line 49 of file Attribute.cs.


The documentation for this class was generated from the following file: