java.lang.Object | ||
↳ | org.apache.lucene.util.AttributeImpl | |
↳ | org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl |
The payload of a Token. See also Payload
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Initialize this attribute with no payload.
| |||||||||||
Initialize this attribute with the given payload.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clears the values in this AttributeImpl and resets it to its
default value.
| |||||||||||
Shallow clone.
| |||||||||||
Copies the values from this Attribute into the passed-in
target attribute.
| |||||||||||
All values used for computation of
hashCode()
should be checked here for equality. | |||||||||||
Returns this Token's payload.
| |||||||||||
Subclasses must implement this method and should compute
a hashCode similar to this:
public int hashCode() { int code = startOffset; code = code * 31 + endOffset; return code; }see also equals(Object)
| |||||||||||
Sets this Token's payload.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.util.AttributeImpl
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.apache.lucene.analysis.tokenattributes.PayloadAttribute
|
Initialize this attribute with no payload.
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.
Shallow clone. Subclasses must override this if they need to clone any members deeply,
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.
All values used for computation of hashCode()
should be checked here for equality.
see also equals(Object)
Subclasses must implement this method and should compute a hashCode similar to this:
public int hashCode() { int code = startOffset; code = code * 31 + endOffset; return code; }see also
equals(Object)