This attribute can be used to pass different flags down the tokenizer chain, eg from one TokenFilter to another one.
More...
#include <FlagsAttribute.h>
Public Member Functions |
| FlagsAttribute () |
virtual | ~FlagsAttribute () |
virtual String | getClassName () |
boost::shared_ptr< FlagsAttribute > | shared_from_this () |
virtual String | toString () |
| Returns a string representation of the object.
|
virtual int32_t | getFlags () |
| Get the bitset for any bits that have been set. This is completely distinct from TypeAttribute#type(), although they do share similar purposes. The flags can be used to encode information about the token for use by other TokenFilters.
|
virtual void | setFlags (int32_t flags) |
virtual void | clear () |
| 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.
|
virtual bool | equals (const LuceneObjectPtr &other) |
| All values used for computation of hashCode() should be checked here for equality.
|
virtual int32_t | hashCode () |
| Subclasses must implement this method and should compute a hashCode similar to this:
|
virtual void | copyTo (const AttributePtr &target) |
| Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.
|
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr()) |
| Shallow clone. Subclasses must override this if they need to clone any members deeply.
|
virtual | ~Attribute () |
virtual | ~LuceneObject () |
virtual void | initialize () |
| Called directly after instantiation to create objects that depend on this object being fully constructed.
|
virtual int32_t | compareTo (const LuceneObjectPtr &other) |
| Compare two objects.
|
virtual | ~LuceneSync () |
virtual SynchronizePtr | getSync () |
| Return this object synchronize lock.
|
virtual LuceneSignalPtr | getSignal () |
| Return this object signal.
|
virtual void | lock (int32_t timeout=0) |
| Lock this object using an optional timeout.
|
virtual void | unlock () |
| Unlock this object.
|
virtual bool | holdsLock () |
| Returns true if this object is currently locked by current thread.
|
virtual void | wait (int32_t timeout=0) |
| Wait for signal using an optional timeout.
|
virtual void | notifyAll () |
| Notify all threads waiting for signal.
|
Protected Attributes |
int32_t | flags |
Detailed Description
This attribute can be used to pass different flags down the tokenizer chain, eg from one TokenFilter to another one.
Constructor & Destructor Documentation
Lucene::FlagsAttribute::FlagsAttribute |
( |
| ) |
|
virtual Lucene::FlagsAttribute::~FlagsAttribute |
( |
| ) |
|
|
virtual |
Member Function Documentation
static String Lucene::FlagsAttribute::_getClassName |
( |
| ) |
|
|
inlinestatic |
virtual void Lucene::FlagsAttribute::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.
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.
virtual void Lucene::FlagsAttribute::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.
virtual bool Lucene::FlagsAttribute::equals |
( |
const LuceneObjectPtr & |
other | ) |
|
|
virtual |
virtual String Lucene::FlagsAttribute::getClassName |
( |
| ) |
|
|
inlinevirtual |
virtual int32_t Lucene::FlagsAttribute::getFlags |
( |
| ) |
|
|
virtual |
Get the bitset for any bits that have been set. This is completely distinct from TypeAttribute#type(), although they do share similar purposes. The flags can be used to encode information about the token for use by other TokenFilters.
virtual int32_t Lucene::FlagsAttribute::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.
virtual void Lucene::FlagsAttribute::setFlags |
( |
int32_t |
flags | ) |
|
|
virtual |
boost::shared_ptr< FlagsAttribute > Lucene::FlagsAttribute::shared_from_this |
( |
| ) |
|
|
inline |
virtual String Lucene::FlagsAttribute::toString |
( |
| ) |
|
|
virtual |
Field Documentation
int32_t Lucene::FlagsAttribute::flags |
|
protected |
The documentation for this class was generated from the following file: