net.cscott.jutil
public class WorkSet<E> extends AbstractSet<E> implements Serializable
Deprecated: Use java.util.LinkedHashSet LinkedHashSet
instead.
Conforms to the JDK 1.2 Collections API.
Version: $Id: WorkSet.java,v 1.5 2006-10-30 19:58:07 cananian Exp $
Constructor Summary | |
---|---|
WorkSet() Creates a new, empty WorkSet with a default capacity
and load factor. | |
WorkSet(int initialCapacity) Constructs a new, empty WorkSet with the specified
initial capacity and default load factor. | |
WorkSet(int initialCapacity, float loadFactor) Constructs a new, empty WorkSet with the specified
initial capacity and the specified load factor. | |
WorkSet(Collection<? extends E> c) Constructs a new WorkSet with the contents of the
specified Collection. |
Method Summary | |
---|---|
boolean | add(E o) Adds the object to the set and returns true if the element
is not already present. |
boolean | addFirst(E o) Adds an element to the front of the (ordered) set and returns true,
if the element is not already present in the set. |
boolean | addLast(E o) Adds an element to the end of the (ordered) set and returns true,
if the element is not already present in the set. |
void | clear() Removes all elements from the set. |
boolean | contains(Object o) Determines if this contains an item.
|
E | getFirst() Returns the first element in the ordered set. |
E | getLast() Returns the last element in the ordered set. |
boolean | isEmpty() Determines if there are any more items left in this.
|
Iterator<E> | iterator() Efficient set iterator. |
E | peek() Looks at the object as the top of this WorkSet
(treating it as a Stack) without removing it
from the set/stack. |
E | pop() Removes the item at the top of this WorkSet
(treating it as a Stack) and returns that object
as the value of this function. |
void | push(E item) Pushes item onto the top of this WorkSet (treating
it as a Stack), if it is not already there.
|
boolean | remove(Object o) |
E | removeFirst() Removes the first element in the ordered set and returns it. |
E | removeLast() Removes the last element in the ordered set and returns it. |
int | size() |
o
is an element of
this
, returns true.
Else returns false.this
has any elements,
returns true. Else returns false.item
is already in the set/on the stack,
then this method does nothing.
this
item
is not already an
element of this
, adds
item
to this
.
Else does nothing.