The start and end character offset of a Token.
More...
#include <PayloadAttribute.h>
The start and end character offset of a Token.
◆ PayloadAttribute() [1/2]
Lucene::PayloadAttribute::PayloadAttribute |
( |
| ) |
|
Initialize this attribute with no payload.
◆ PayloadAttribute() [2/2]
Lucene::PayloadAttribute::PayloadAttribute |
( |
const PayloadPtr & |
payload | ) |
|
Initialize this attribute with the given payload.
◆ ~PayloadAttribute()
virtual Lucene::PayloadAttribute::~PayloadAttribute |
( |
| ) |
|
|
virtual |
◆ _getClassName()
static String Lucene::PayloadAttribute::_getClassName |
( |
| ) |
|
|
inlinestatic |
◆ clear()
virtual void Lucene::PayloadAttribute::clear |
( |
| ) |
|
|
virtual |
Clears the values in this Attribute and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.
Implements Lucene::Attribute.
◆ clone()
Shallow clone. Subclasses must override this if they need to clone any members deeply.
- Parameters
-
base | clone reference - null when called initially, then set in top virtual override. |
Implements Lucene::Attribute.
◆ copyTo()
virtual void Lucene::PayloadAttribute::copyTo |
( |
const AttributePtr & |
target | ) |
|
|
virtual |
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.
Implements Lucene::Attribute.
◆ equals()
virtual bool Lucene::PayloadAttribute::equals |
( |
const LuceneObjectPtr & |
other | ) |
|
|
virtual |
◆ getClassName()
virtual String Lucene::PayloadAttribute::getClassName |
( |
| ) |
|
|
inlinevirtual |
◆ getPayload()
virtual PayloadPtr Lucene::PayloadAttribute::getPayload |
( |
| ) |
|
|
virtual |
Returns this Token's payload.
◆ hashCode()
virtual int32_t Lucene::PayloadAttribute::hashCode |
( |
| ) |
|
|
virtual |
Subclasses must implement this method and should compute a hashCode similar to this:
int32_t hashCode() { int32_t code = startOffset; code = code * 31 + endOffset; return code; }
see also equals(Object)
Implements Lucene::Attribute.
◆ setPayload()
virtual void Lucene::PayloadAttribute::setPayload |
( |
const PayloadPtr & |
payload | ) |
|
|
virtual |
Sets this Token's payload.
◆ shared_from_this()
boost::shared_ptr< PayloadAttribute > Lucene::PayloadAttribute::shared_from_this |
( |
| ) |
|
|
inline |
◆ toString()
virtual String Lucene::PayloadAttribute::toString |
( |
| ) |
|
|
virtual |
◆ payload
The documentation for this class was generated from the following file: