org.apache.lucene.index

## Class TermVectorOffsetInfo

- java.lang.Object
- - org.apache.lucene.index.TermVectorOffsetInfo

- All Implemented Interfaces:
    java.io.Serializable

      public class TermVectorOffsetInfo
      extends java.lang.Object
      implements java.io.Serializable

  The TermVectorOffsetInfo class holds information pertaining to a Term in a `TermPositionVector`'s offset information. This offset information is the character offset as set during the Analysis phase (and thus may not be the actual offset in the original content).
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TermVectorOffsetInfo[]` | `EMPTY_OFFSET_INFO` Convenience declaration when creating a `TermPositionVector` that stores only position information.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TermVectorOffsetInfo()`
    `TermVectorOffsetInfo(int startOffset, int endOffset)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)` Two TermVectorOffsetInfos are equals if both the start and end offsets are the same
    `int` | `getEndOffset()` The accessor for the ending offset for the term
    `int` | `getStartOffset()` The accessor for the starting offset of the term.
    `int` | `hashCode()`
    `void` | `setEndOffset(int endOffset)`
    `void` | `setStartOffset(int startOffset)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### EMPTY_OFFSET_INFO

          public static final transient TermVectorOffsetInfo[] EMPTY_OFFSET_INFO

      Convenience declaration when creating a `TermPositionVector` that stores only position information.

  - ### Constructor Detail

    - #### TermVectorOffsetInfo

          public TermVectorOffsetInfo()

    - #### TermVectorOffsetInfo

          public TermVectorOffsetInfo(int startOffset,
                                      int endOffset)

  - ### Method Detail

    - #### getEndOffset

          public int getEndOffset()

      The accessor for the ending offset for the term
      Returns:
        The offset

    - #### setEndOffset

          public void setEndOffset(int endOffset)

    - #### getStartOffset

          public int getStartOffset()

      The accessor for the starting offset of the term.
      Returns:
        The offset

    - #### setStartOffset

          public void setStartOffset(int startOffset)

    - #### equals

          public boolean equals(java.lang.Object o)

      Two TermVectorOffsetInfos are equals if both the start and end offsets are the same
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `o` - The comparison Object
      Returns:
        true if both `getStartOffset()` and `getEndOffset()` are the same for both objects.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.