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.


Constructor Index

 o DSL(Comparable)
Construct the DSL.

Method Index

 o find(Comparable)
Find an item in the DSL.
 o findMax()
Find the largest item in the DSL.
 o findMin()
Find the smallest item in the DSL.
 o insert(Comparable)
Insert into the DSL.
 o isEmpty()
Test if the DSL is logically empty.
 o main(String[])
 o makeEmpty()
Make the DSL logically empty.
 o remove(Comparable)
Remove from the DSL.

Constructors

 o DSL
public DSL(Comparable inf)
Construct the DSL.

Parameters:
inf - the largest Comparable.

Methods

 o insert
public void insert(Comparable x)
Insert into the DSL.

Parameters:
x - the item to insert.
 o remove
public void remove(Comparable x)
Remove from the DSL. Unimplemented.

Parameters:
x - the item to remove.
 o findMin
public Comparable findMin()
Find the smallest item in the DSL.

Returns:
smallest item, or null if empty.
 o findMax
public Comparable findMax()
Find the largest item in the DSL.

Returns:
the largest item, or null if empty.
 o 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.
 o makeEmpty
public void makeEmpty()
Make the DSL logically empty.

 o isEmpty
public boolean isEmpty()
Test if the DSL is logically empty.

Returns:
true if empty, false otherwise.
 o main
public static void main(String[] args)

All Packages  Class Hierarchy  This Package  Previous  Next  Index