All Packages Class Hierarchy This Package Previous Next Index
Class DataStructures.DSL
java.lang.Object
|
+----DataStructures.DSL
- public class DSL
- extends Object
Implements a deterministic skip list.
Note that all "matching" is based on the compareTo method.
DSL(Comparable)
- Construct the DSL.
find(Comparable)
- Find an item in the DSL.
findMax()
- Find the largest item in the DSL.
findMin()
- Find the smallest item in the DSL.
insert(Comparable)
- Insert into the DSL.
isEmpty()
- Test if the DSL is logically empty.
main(String[])
-
makeEmpty()
- Make the DSL logically empty.
remove(Comparable)
- Remove from the DSL.
DSL
public DSL(Comparable inf)
- Construct the DSL.
- Parameters:
- inf - the largest Comparable.
insert
public void insert(Comparable x)
- Insert into the DSL.
- Parameters:
- x - the item to insert.
remove
public void remove(Comparable x)
- Remove from the DSL. Unimplemented.
- Parameters:
- x - the item to remove.
findMin
public Comparable findMin()
- Find the smallest item in the DSL.
- Returns:
- smallest item, or null if empty.
findMax
public Comparable findMax()
- Find the largest item in the DSL.
- Returns:
- the largest item, or null if empty.
find
public Comparable find(Comparable x)
- Find an item in the DSL.
- Parameters:
- x - the item to search for.
- Returns:
- the matching item, or null if not found.
makeEmpty
public void makeEmpty()
- Make the DSL logically empty.
isEmpty
public boolean isEmpty()
- Test if the DSL is logically empty.
- Returns:
- true if empty, false otherwise.
main
public static void main(String[] args)
All Packages Class Hierarchy This Package Previous Next Index