Lucene.Net
3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
|
The term text of a Token. More...
Inherits Attribute, Lucene.Net.Analysis.Tokenattributes.ITermAttribute, and ICloneable.
Public Member Functions | |
virtual void | SetTermBuffer (char[] buffer, int offset, int length) |
Copies the contents of buffer, starting at offset for length characters, into the termBuffer array. | |
virtual void | SetTermBuffer (System.String buffer) |
Copies the contents of buffer into the termBuffer array. | |
virtual void | SetTermBuffer (System.String buffer, int offset, int length) |
Copies the contents of buffer, starting at offset and continuing for length characters, into the termBuffer array. | |
virtual char[] | TermBuffer () |
Returns the internal termBuffer character array which you can then directly alter. If the array is too small for your token, use ResizeTermBuffer(int) to increase it. After altering the buffer be sure to call SetTermLength to record the number of valid characters that were placed into the termBuffer. | |
virtual char[] | ResizeTermBuffer (int newSize) |
Grows the termBuffer to at least size newSize, preserving the existing content. Note: If the next operation is to change the contents of the term buffer use SetTermBuffer(char[], int, int), SetTermBuffer(String), or SetTermBuffer(String, int, int) to optimally combine the resize with the setting of the termBuffer. | |
virtual int | TermLength () |
Return number of valid characters (length of the term) in the termBuffer array. | |
virtual void | SetTermLength (int length) |
Set number of valid characters (length of the term) in the termBuffer array. Use this to truncate the termBuffer or to synchronize with external manipulation of the termBuffer. Note: to grow the size of the array, use ResizeTermBuffer(int) first. | |
override int | GetHashCode () |
override void | Clear () |
override System.Object | Clone () |
override bool | Equals (System.Object other) |
override System.String | ToString () |
override void | CopyTo (Attribute target) |
Properties | |
virtual string | Term [get] |
Returns the Token's term text. | |
Properties inherited from Lucene.Net.Analysis.Tokenattributes.ITermAttribute | |
string | Term [get] |
Returns the Token's term text. | |
The term text of a Token.
Definition at line 28 of file TermAttribute.cs.
override void Lucene.Net.Analysis.Tokenattributes.TermAttribute.Clear | ( | ) |
Definition at line 210 of file TermAttribute.cs.
override System.Object Lucene.Net.Analysis.Tokenattributes.TermAttribute.Clone | ( | ) |
Definition at line 215 of file TermAttribute.cs.
override void Lucene.Net.Analysis.Tokenattributes.TermAttribute.CopyTo | ( | Attribute | target | ) |
Definition at line 261 of file TermAttribute.cs.
override bool Lucene.Net.Analysis.Tokenattributes.TermAttribute.Equals | ( | System.Object | other | ) |
Definition at line 227 of file TermAttribute.cs.
override int Lucene.Net.Analysis.Tokenattributes.TermAttribute.GetHashCode | ( | ) |
Definition at line 202 of file TermAttribute.cs.
|
virtual |
Grows the termBuffer to at least size newSize, preserving the existing content. Note: If the next operation is to change the contents of the term buffer use SetTermBuffer(char[], int, int), SetTermBuffer(String), or SetTermBuffer(String, int, int) to optimally combine the resize with the setting of the termBuffer.
newSize | minimum size of the new termBuffer |
Implements Lucene.Net.Analysis.Tokenattributes.ITermAttribute.
Definition at line 124 of file TermAttribute.cs.
|
virtual |
Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.
buffer | the buffer to copy |
offset | the index in the buffer of the first character to copy |
length | the number of characters to copy |
Implements Lucene.Net.Analysis.Tokenattributes.ITermAttribute.
Definition at line 62 of file TermAttribute.cs.
|
virtual |
Copies the contents of buffer into the termBuffer array.
buffer | the buffer to copy |
Implements Lucene.Net.Analysis.Tokenattributes.ITermAttribute.
Definition at line 72 of file TermAttribute.cs.
|
virtual |
Copies the contents of buffer, starting at offset and continuing for length characters, into the termBuffer array.
buffer | the buffer to copy |
offset | the index in the buffer of the first character to copy |
length | the number of characters to copy |
Implements Lucene.Net.Analysis.Tokenattributes.ITermAttribute.
Definition at line 89 of file TermAttribute.cs.
|
virtual |
Set number of valid characters (length of the term) in the termBuffer array. Use this to truncate the termBuffer or to synchronize with external manipulation of the termBuffer. Note: to grow the size of the array, use ResizeTermBuffer(int) first.
length | the truncated length |
Implements Lucene.Net.Analysis.Tokenattributes.ITermAttribute.
Definition at line 194 of file TermAttribute.cs.
|
virtual |
Returns the internal termBuffer character array which you can then directly alter. If the array is too small for your token, use ResizeTermBuffer(int) to increase it. After altering the buffer be sure to call SetTermLength to record the number of valid characters that were placed into the termBuffer.
Implements Lucene.Net.Analysis.Tokenattributes.ITermAttribute.
Definition at line 106 of file TermAttribute.cs.
|
virtual |
Return number of valid characters (length of the term) in the termBuffer array.
Implements Lucene.Net.Analysis.Tokenattributes.ITermAttribute.
Definition at line 181 of file TermAttribute.cs.
override System.String Lucene.Net.Analysis.Tokenattributes.TermAttribute.ToString | ( | ) |
Definition at line 255 of file TermAttribute.cs.
|
get |
Returns the Token's term text.
This method has a performance penalty because the text is stored internally in a char[]. If possible, use TermBuffer() and TermLength() directly instead. If you really need a String, use this method, which is nothing more than a convenience call to new String(token.termBuffer(), 0, token.termLength())
Definition at line 45 of file TermAttribute.cs.