The OffsetAttributeImpl type exposes the following members.

Constructors

  NameDescription
Public methodOffsetAttributeImpl
Initializes a new instance of the OffsetAttributeImpl class

Methods

  NameDescription
Public methodClear (Overrides AttributeImpl..::..Clear()()()().)
Public methodClone (Overrides AttributeImpl..::..Clone()()()().)
Public methodCopyTo (Overrides AttributeImpl..::..CopyTo(AttributeImpl).)
Public methodEndOffset
Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text. The length of the token in the source text is (endOffset - startOffset).
Public methodEquals (Overrides AttributeImpl..::..Equals(Object).)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode (Overrides AttributeImpl..::..GetHashCode()()()().)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetOffset
Set the starting and ending offset. See StartOffset() and EndOffset()
Public methodStartOffset
Returns this Token's starting offset, the position of the first character corresponding to this token in the source text. Note that the difference between endOffset() and startOffset() may not be equal to termText.length(), as the term text may have been altered by a stemmer or some other filter.
Public methodToString
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.
(Inherited from AttributeImpl.)

See Also