Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes
Lucene::CharArraySet Class Reference

A simple class that stores Strings as char[]'s in a hash table. Note that this is not a general purpose class. For example, it cannot remove items from the set, nor does it resize its hash table to be smaller, etc. It is designed to be quick to test if a char[] is in the set without the necessity of converting it to a String first. More...

#include <CharArraySet.h>

+ Inheritance diagram for Lucene::CharArraySet:

Public Member Functions

 CharArraySet (bool ignoreCase)
 
 CharArraySet (HashSet< String > entries, bool ignoreCase)
 Create set from a set of strings.
 
 CharArraySet (Collection< String > entries, bool ignoreCase)
 Create set from a collection of strings.
 
virtual ~CharArraySet ()
 
virtual String getClassName ()
 
boost::shared_ptr< CharArraySetshared_from_this ()
 
virtual bool contains (const String &text)
 
virtual bool contains (const wchar_t *text, int32_t offset, int32_t length)
 True if the length chars of text starting at offset are in the set.
 
virtual bool add (const String &text)
 Add this String into the set.
 
virtual bool add (CharArray text)
 Add this char[] into the set.
 
virtual int32_t size ()
 
virtual bool isEmpty ()
 
HashSet< String >::iterator begin ()
 
HashSet< String >::iterator end ()
 
- Public Member Functions inherited from Lucene::LuceneObject
virtual ~LuceneObject ()
 
virtual void initialize ()
 Called directly after instantiation to create objects that depend on this object being fully constructed.
 
virtual LuceneObjectPtr clone (const LuceneObjectPtr &other=LuceneObjectPtr())
 Return clone of this object.
 
virtual int32_t hashCode ()
 Return hash code for this object.
 
virtual bool equals (const LuceneObjectPtr &other)
 Return whether two objects are equal.
 
virtual int32_t compareTo (const LuceneObjectPtr &other)
 Compare two objects.
 
virtual String toString ()
 Returns a string representation of the object.
 
- Public Member Functions inherited from Lucene::LuceneSync
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.
 

Static Public Member Functions

static String _getClassName ()
 

Protected Attributes

HashSet< String > entries
 
bool ignoreCase
 
- Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
 
LuceneSignalPtr objectSignal
 

Additional Inherited Members

- Protected Member Functions inherited from Lucene::LuceneObject
 LuceneObject ()
 

Detailed Description

A simple class that stores Strings as char[]'s in a hash table. Note that this is not a general purpose class. For example, it cannot remove items from the set, nor does it resize its hash table to be smaller, etc. It is designed to be quick to test if a char[] is in the set without the necessity of converting it to a String first.

Constructor & Destructor Documentation

◆ CharArraySet() [1/3]

Lucene::CharArraySet::CharArraySet ( bool  ignoreCase)

◆ CharArraySet() [2/3]

Lucene::CharArraySet::CharArraySet ( HashSet< String >  entries,
bool  ignoreCase 
)

Create set from a set of strings.

◆ CharArraySet() [3/3]

Lucene::CharArraySet::CharArraySet ( Collection< String >  entries,
bool  ignoreCase 
)

Create set from a collection of strings.

◆ ~CharArraySet()

virtual Lucene::CharArraySet::~CharArraySet ( )
virtual

Member Function Documentation

◆ _getClassName()

static String Lucene::CharArraySet::_getClassName ( )
inlinestatic

◆ add() [1/2]

virtual bool Lucene::CharArraySet::add ( CharArray  text)
virtual

Add this char[] into the set.

◆ add() [2/2]

virtual bool Lucene::CharArraySet::add ( const String &  text)
virtual

Add this String into the set.

◆ begin()

HashSet< String >::iterator Lucene::CharArraySet::begin ( )

◆ contains() [1/2]

virtual bool Lucene::CharArraySet::contains ( const String &  text)
virtual

◆ contains() [2/2]

virtual bool Lucene::CharArraySet::contains ( const wchar_t *  text,
int32_t  offset,
int32_t  length 
)
virtual

True if the length chars of text starting at offset are in the set.

◆ end()

HashSet< String >::iterator Lucene::CharArraySet::end ( )

◆ getClassName()

virtual String Lucene::CharArraySet::getClassName ( )
inlinevirtual

◆ isEmpty()

virtual bool Lucene::CharArraySet::isEmpty ( )
virtual

◆ shared_from_this()

boost::shared_ptr< CharArraySet > Lucene::CharArraySet::shared_from_this ( )
inline

◆ size()

virtual int32_t Lucene::CharArraySet::size ( )
virtual

Field Documentation

◆ entries

HashSet<String> Lucene::CharArraySet::entries
protected

◆ ignoreCase

bool Lucene::CharArraySet::ignoreCase
protected

The documentation for this class was generated from the following file:

clucene.sourceforge.net