public class TLongHashSetDecorator
extends java.util.AbstractSet
implements java.util.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 2002| Modifier and Type | Field and Description |
|---|---|
protected TLongHashSet |
_set
the wrapped primitive set
|
| Constructor and Description |
|---|
TLongHashSetDecorator(TLongHashSet set)
Creates a wrapper that decorates the specified primitive set.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.Object value)
Inserts a value into the set.
|
void |
clear()
Empties the set.
|
boolean |
equals(java.lang.Object other)
Compares this set with another set for equality of their stored
entries.
|
boolean |
isEmpty()
Indicates whether set has any entries.
|
java.util.Iterator |
iterator()
Creates an iterator over the values of the set.
|
boolean |
remove(java.lang.Object value)
Deletes a value from the set.
|
int |
size()
Returns the number of entries in the set.
|
protected long |
unwrap(java.lang.Object value)
Unwraps a value
|
protected java.lang.Long |
wrap(long k)
Wraps a value
|
addAll, contains, containsAll, retainAll, toArray, toArray, toStringprotected final TLongHashSet _set
public TLongHashSetDecorator(TLongHashSet set)
public boolean add(java.lang.Object value)
add in interface java.util.Collectionadd in interface java.util.Setadd in class java.util.AbstractCollectiontrue - if the set was modified by the insertionpublic boolean equals(java.lang.Object other)
equals in interface java.util.Collectionequals in interface java.util.Setequals in class java.util.AbstractSetother - an Object valuepublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Setclear in class java.util.AbstractCollectionpublic boolean remove(java.lang.Object value)
remove in interface java.util.Collectionremove in interface java.util.Setremove in class java.util.AbstractCollectionvalue - an Object valuepublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setiterator in class java.util.AbstractCollectionpublic int size()
size in interface java.util.Collectionsize in interface java.util.Setsize in class java.util.AbstractCollectionpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.SetisEmpty in class java.util.AbstractCollectionprotected java.lang.Long wrap(long k)
a - value in the underlying setprotected long unwrap(java.lang.Object value)
a - wrapped value