|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--ListManager
This class is a very simple demo of searching and sorting.
| Constructor Summary | |
ListManager()
This class is a simple implementation of a sorted insertion and a binary search. |
|
| Method Summary | |
void |
addItem(java.lang.Comparable obj)
Add a Comparable object to the list. |
java.lang.Object |
findItem(java.lang.Comparable key)
Searches the list for the specified object using the binary search algorithm. |
void |
printList()
Print the contents of the list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ListManager()
| Method Detail |
public void addItem(java.lang.Comparable obj)
public void printList()
public java.lang.Object findItem(java.lang.Comparable key)
key - the value to be searched for.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||