public interface SearchingAlgorithm
To use, select an implementation of this, and an instance of
SearchingGopher, and then sort away.
The less-than-hardcore should look at SearchingLib since it has
convenience functions that make it things much easier.
Copyright 2000-2006 Partner Software, Inc.
| Modifier and Type | Method and Description |
|---|---|
int |
findClosest(SearchingGopher gopher,
java.lang.Object key)
Finds the slot where the given key would go if it were in there.
|
int |
findClosest(SearchingGopher gopher,
java.lang.Object key,
int start,
int end)
Finds the slot where the given key would go if it were in there
over the given inclusive range (start <= i <= end).
|
int |
search(SearchingGopher gopher,
java.lang.Object key)
Searches for the given key using the given gopher.
|
int |
search(SearchingGopher gopher,
java.lang.Object key,
int start,
int end)
Searches for the given key using the given gopher over the given range
(start <= i < end).
|
int search(SearchingGopher gopher, java.lang.Object key)
gopher - adapter to underlying array-like structurekey - value to search forint search(SearchingGopher gopher, java.lang.Object key, int start, int end)
gopher - adapter to underlying array-like structurekey - value to search forstart - start of index range, inclusive (start <= i)end - end of index range, exclusive (i < end)int findClosest(SearchingGopher gopher, java.lang.Object key)
gopher - adapter to underlying array-like structurekey - value to search forint findClosest(SearchingGopher gopher, java.lang.Object key, int start, int end)
gopher - adapter to underlying array-like structurekey - value to search forstart - start of index range, inclusive (start <= i)end - end of index range, exclusive (i < end)