|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet
gnu.trove.decorator.TFloatHashSetDecorator
public class TFloatHashSetDecorator
Wrapper class to make a TFloatHashSet conform to the java.util.Set API. This class simply decorates an underlying TFloatHashSet and translates the Object-based APIs into their Trove primitive analogs.
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
| Field Summary | |
|---|---|
protected TFloatHashSet |
_set
the wrapped primitive set |
| Constructor Summary | |
|---|---|
TFloatHashSetDecorator(TFloatHashSet set)
Creates a wrapper that decorates the specified primitive set. |
|
| Method Summary | |
|---|---|
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 float |
unwrap(java.lang.Object value)
Unwraps a value |
protected java.lang.Float |
wrap(float k)
Wraps a value |
| Methods inherited from class java.util.AbstractSet |
|---|
hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
addAll, contains, containsAll, hashCode, removeAll, retainAll, toArray, toArray |
| Field Detail |
|---|
protected final TFloatHashSet _set
| Constructor Detail |
|---|
public TFloatHashSetDecorator(TFloatHashSet set)
| Method Detail |
|---|
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 value
public 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 value
public 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.Float wrap(float k)
a - value in the underlying set
protected float unwrap(java.lang.Object value)
a - wrapped value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||