Lucene++ - a full-featured, c++ search engine
API Documentation
Provides support for converting longs to Strings, and back again. The strings are structured so that lexicographic sorting order is preserved. More...
#include <NumberTools.h>
Public Member Functions | |
virtual | ~NumberTools () |
virtual String | getClassName () |
boost::shared_ptr< NumberTools > | shared_from_this () |
![]() | |
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. | |
![]() | |
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 () |
static const String & | MIN_STRING_VALUE () |
Equivalent to longToString(LLONG_MIN) | |
static const String & | MAX_STRING_VALUE () |
Equivalent to longToString(LLONG_MAX) | |
static int32_t | STR_SIZE () |
The length of (all) strings returned by longToString . | |
static String | longToString (int64_t l) |
Converts a long to a String suitable for indexing. | |
static int64_t | stringToLong (const String &str) |
Converts a String that was returned by longToString back to a long. | |
Static Protected Attributes | |
static const int32_t | RADIX |
static const wchar_t | NEGATIVE_PREFIX |
static const wchar_t | POSITIVE_PREFIX |
Additional Inherited Members | |
![]() | |
LuceneObject () | |
![]() | |
SynchronizePtr | objectLock |
LuceneSignalPtr | objectSignal |
Provides support for converting longs to Strings, and back again. The strings are structured so that lexicographic sorting order is preserved.
That is, if l1 is less than l2 for any two longs l1 and l2, then NumberTools.longToString(l1) is lexicographically less than NumberTools.longToString(l2). (Similarly for "greater than" and "equals".)
This class handles all long values (unlike DateField
).
NumericUtils
instead, which provides a sortable binary representation (prefix encoded) of numeric values. To index and efficiently query numeric values use NumericField
and NumericRangeQuery
. This class is included for use with existing indices and will be removed in a future release (possibly Lucene 4.0).
|
virtual |
|
inlinestatic |
|
inlinevirtual |
|
static |
Converts a long to a String suitable for indexing.
|
static |
Equivalent to longToString(LLONG_MAX)
|
static |
Equivalent to longToString(LLONG_MIN)
|
inline |
|
static |
The length of (all) strings returned by longToString
.
|
static |
Converts a String that was returned by longToString
back to a long.
|
staticprotected |
|
staticprotected |
|
staticprotected |