Package org.apache.lucene.index
Class TermVectorOffsetInfo
- java.lang.Object
-
- org.apache.lucene.index.TermVectorOffsetInfo
-
- All Implemented Interfaces:
Serializable
public class TermVectorOffsetInfo extends Object implements Serializable
The TermVectorOffsetInfo class holds information pertaining to a Term in aTermPositionVector'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 Description static TermVectorOffsetInfo[]EMPTY_OFFSET_INFOConvenience declaration when creating aTermPositionVectorthat stores only position information.
-
Constructor Summary
Constructors Constructor Description TermVectorOffsetInfo()TermVectorOffsetInfo(int startOffset, int endOffset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Two TermVectorOffsetInfos are equals if both the start and end offsets are the sameintgetEndOffset()The accessor for the ending offset for the termintgetStartOffset()The accessor for the starting offset of the term.inthashCode()voidsetEndOffset(int endOffset)voidsetStartOffset(int startOffset)
-
-
-
Field Detail
-
EMPTY_OFFSET_INFO
public static final transient TermVectorOffsetInfo[] EMPTY_OFFSET_INFO
Convenience declaration when creating aTermPositionVectorthat stores only position information.
-
-
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(Object o)
Two TermVectorOffsetInfos are equals if both the start and end offsets are the same- Overrides:
equalsin classObject- Parameters:
o- The comparison Object- Returns:
- true if both
getStartOffset()andgetEndOffset()are the same for both objects.
-
-