|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.helidb.search.SearchMode
public class SearchMode
This class defines constants for all search modes supported by the different databases. A database or database backend may inherit this class or create new instances of it to define its own search modes.
| Field Summary | |
|---|---|
static SearchMode |
CLOSEST_ABOVE
Search for an exact match or the closest key value greater than the search key. |
static SearchMode |
CLOSEST_BELOW
Search for an exact match or the closest key value less than the search key. |
static SearchMode |
CLOSEST_MATCH
Search for the closest match. |
static SearchMode |
EXACT_MATCH
Search for an exact match. |
| Constructor Summary | |
|---|---|
SearchMode(String tag)
Create a new search mode. |
|
| Method Summary | |
|---|---|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final SearchMode EXACT_MATCH
public static final SearchMode CLOSEST_MATCH
This search mode requires that the compareTo method used (either
from the database keys themselves or from a custom
Comparator used for the search) return the distance
between two compared objects. This means that Number types such
as Integer or Long cannot be compared without a custom
Comparator since, even though Number is
Comparable, the compareTo methods of Number
objects do not return the distance between the compared objects.
public static final SearchMode CLOSEST_BELOW
This search mode requires that the compareTo method used (either
from the database keys themselves or from a custom
Comparator used for the search) return the distance
between two compared objects. This means that Number types such
as Integer or Long cannot be compared without a custom
Comparator since, even though Number is
Comparable, the compareTo methods of Number
objects do not return the distance between the compared objects.
public static final SearchMode CLOSEST_ABOVE
This search mode requires that the compareTo method used (either
from the database keys themselves or from a custom
Comparator used for the search) return the distance
between two compared objects. This means that Number types such
as Integer or Long cannot be compared without a custom
Comparator since, even though Number is
Comparable, the compareTo methods of Number
objects do not return the distance between the compared objects.
| Constructor Detail |
|---|
public SearchMode(String tag)
tag - A descriptive tag that is returned from the
toString() method.| Method Detail |
|---|
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||