org.apache.lucene.index

Class TermVectorOffsetInfo

public class TermVectorOffsetInfo extends Object

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).
Field Summary
static TermVectorOffsetInfo[]EMPTY_OFFSET_INFO
Convenience declaration when creating a TermPositionVector that stores only position information.
Constructor Summary
TermVectorOffsetInfo()
TermVectorOffsetInfo(int startOffset, int endOffset)
Method Summary
booleanequals(Object o)
Two TermVectorOffsetInfos are equals if both the start and end offsets are the same
intgetEndOffset()
The accessor for the ending offset for the term
intgetStartOffset()
The accessor for the starting offset of the term.
inthashCode()
voidsetEndOffset(int endOffset)
voidsetStartOffset(int startOffset)

Field Detail

EMPTY_OFFSET_INFO

public static final 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

equals

public boolean equals(Object o)
Two TermVectorOffsetInfos are equals if both the start and end offsets are the same

Parameters: o The comparison Object

Returns: true if both getStartOffset and getEndOffset are the same for both objects.

getEndOffset

public int getEndOffset()
The accessor for the ending offset for the term

Returns: The offset

getStartOffset

public int getStartOffset()
The accessor for the starting offset of the term.

Returns: The offset

hashCode

public int hashCode()

setEndOffset

public void setEndOffset(int endOffset)

setStartOffset

public void setStartOffset(int startOffset)
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.