harpoon.Util
Interface Worklist<E>

All Known Implementing Classes:
WorkSet

public interface Worklist<E>

A Worklist is a unique set.

Version:
$Id: Worklist.java,v 1.4 2002/04/10 03:07:05 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Method Summary
 boolean contains(Object item)
          Determines if the Worklist contains an item.
 boolean isEmpty()
          Determines if there are any more items left in the Worklist.
 E pull()
          Removes some item from the Worklist and return it.
 void push(E item)
          Pushes an item onto the Worklist if it is not already there.
 

Method Detail

push

void push(E item)
Pushes an item onto the Worklist if it is not already there.
modifies: this
effects: If item is not already an element of this, adds item to this. Else does nothing.


pull

E pull()
Removes some item from the Worklist and return it.
modifies: this
effects: If there exists an Object, item, that is an element of this, removes item from this and returns item. Else does nothing.


contains

boolean contains(Object item)
Determines if the Worklist contains an item.
effects: If item is an element of this, returns true. Else returns false.


isEmpty

boolean isEmpty()
Determines if there are any more items left in the Worklist.
effects: If this has any elements, returns true. Else returns false.