Class OffsetAttributeImpl

java.lang.Object
org.apache.lucene.util.AttributeImpl
org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl
All Implemented Interfaces:
Cloneable, OffsetAttribute, Attribute

public class OffsetAttributeImpl extends AttributeImpl implements OffsetAttribute
Default implementation of OffsetAttribute.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initialize this attribute with startOffset and endOffset of 0.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears the values in this AttributeImpl and resets it to its default value.
    void
    Copies the values from this Attribute into the passed-in target attribute.
    int
    Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text.
    boolean
    equals(Object other)
     
    int
     
    void
    This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
    void
    setOffset(int startOffset, int endOffset)
    Set the starting and ending offset.
    int
    Returns this Token's starting offset, the position of the first character corresponding to this token in the source text.

    Methods inherited from class org.apache.lucene.util.AttributeImpl

    clone, end, reflectAsString

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait