gnu.trove.decorator
public class TIntHashSetDecorator extends AbstractSet implements Set
Note that wrapping and unwrapping primitive values is extremely inefficient. If possible, users of this class should override the appropriate methods in this class and use a table of canonical values.
Created: Tue Sep 24 22:08:17 PDT 2002Since: trove 0.1.8
Version: $Id: TIntHashSetDecorator.java,v 1.2 2002/09/25 05:14:38 ericdf Exp $
Field Summary | |
---|---|
protected TIntHashSet | _set the wrapped primitive set |
Constructor Summary | |
---|---|
TIntHashSetDecorator(TIntHashSet set)
Creates a wrapper that decorates the specified primitive set. |
Method Summary | |
---|---|
boolean | add(Object value)
Inserts a value into the set.
|
void | clear()
Empties the set. |
boolean | equals(Object other)
Compares this set with another set for equality of their stored
entries.
|
boolean | isEmpty()
Indicates whether set has any entries. |
Iterator | iterator()
Creates an iterator over the values of the set.
|
boolean | remove(Object value)
Deletes a value from the set.
|
int | size()
Returns the number of entries in the set. |
protected int | unwrap(Object value)
Unwraps a value
|
protected Integer | wrap(int k)
Wraps a value
|
Parameters: true if the set was modified by the insertion
Parameters: other an Object
value
Returns: true if the sets are identical
Returns: true if the set is empty
Returns: an iterator with support for removals in the underlying set
Parameters: value an Object
value
Returns: true if the set was modified
Returns: the set's size.
Parameters: a wrapped value
Returns: an unwrapped representation of the value
Parameters: a value in the underlying set
Returns: an Object representation of the value