7 #ifndef PAYLOADATTRIBUTE_H
8 #define PAYLOADATTRIBUTE_H
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Base class for Attributes that can be added to a AttributeSource.
Definition: Attribute.h:18
The start and end character offset of a Token.
Definition: PayloadAttribute.h:15
virtual void clear()
Clears the values in this Attribute and resets it to its default value. If this implementation implem...
PayloadPtr payload
Definition: PayloadAttribute.h:25
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Shallow clone. Subclasses must override this if they need to clone any members deeply.
virtual String toString()
Returns a string representation of the object.
virtual void copyTo(const AttributePtr &target)
Copies the values from this Attribute into the passed-in target attribute. The target implementation ...
PayloadAttribute(const PayloadPtr &payload)
Initialize this attribute with the given payload.
virtual ~PayloadAttribute()
virtual PayloadPtr getPayload()
Returns this Token's payload.
virtual int32_t hashCode()
Subclasses must implement this method and should compute a hashCode similar to this:
virtual bool equals(const LuceneObjectPtr &other)
All values used for computation of hashCode() should be checked here for equality.
virtual void setPayload(const PayloadPtr &payload)
Sets this Token's payload.
PayloadAttribute()
Initialize this attribute with no payload.
Definition: AbstractAllTermDocs.h:12
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
boost::shared_ptr< Payload > PayloadPtr
Definition: LuceneTypes.h:198
boost::shared_ptr< Attribute > AttributePtr
Definition: LuceneTypes.h:518