|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SearchingAlgorithm
An interface for generic array (indexed item, not necessarily an actual Java array object) searching algorithms.
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.
| Method Summary | |
|---|---|
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). |
| Method Detail |
|---|
int search(SearchingGopher gopher,
java.lang.Object key)
gopher - adapter to underlying array-like structurekey - value to search for
int 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 for
int 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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||