|
GNU Trove | ||||||||
| 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<java.lang.Float>
gnu.trove.decorator.TFloatSetDecorator
public class TFloatSetDecorator
Wrapper class to make a TFloatSet conform to the java.util.Set API. This class simply decorates an underlying TFloatSet 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 TFloatSet |
_set
the wrapped primitive set |
| Constructor Summary | |
|---|---|
TFloatSetDecorator()
FOR EXTERNALIZATION ONLY!! |
|
TFloatSetDecorator(TFloatSet set)
Creates a wrapper that decorates the specified primitive set. |
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Float value)
Inserts a value into the set. |
void |
clear()
Empties the set. |
boolean |
contains(java.lang.Object o)
|
boolean |
equals(java.lang.Object other)
Compares this set with another set for equality of their stored entries. |
TFloatSet |
getSet()
Returns a reference to the set wrapped by this decorator. |
boolean |
isEmpty()
Indicates whether set has any entries. |
java.util.Iterator<java.lang.Float> |
iterator()
Creates an iterator over the values of the set. |
void |
readExternal(java.io.ObjectInput in)
|
boolean |
remove(java.lang.Object value)
Deletes a value from the set. |
int |
size()
Returns the number of entries in the set. |
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.util.AbstractSet |
|---|
hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, 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, containsAll, hashCode, removeAll, retainAll, toArray, toArray |
| Field Detail |
|---|
protected TFloatSet _set
| Constructor Detail |
|---|
public TFloatSetDecorator()
public TFloatSetDecorator(TFloatSet set)
set - the TFloatSet to wrap.| Method Detail |
|---|
public TFloatSet getSet()
public boolean add(java.lang.Float value)
add in interface java.util.Collection<java.lang.Float>add in interface java.util.Set<java.lang.Float>add in class java.util.AbstractCollection<java.lang.Float>value - true if the set was modified by the insertionpublic boolean equals(java.lang.Object other)
equals in interface java.util.Collection<java.lang.Float>equals in interface java.util.Set<java.lang.Float>equals in class java.util.AbstractSet<java.lang.Float>other - an Object value
public void clear()
clear in interface java.util.Collection<java.lang.Float>clear in interface java.util.Set<java.lang.Float>clear in class java.util.AbstractCollection<java.lang.Float>public boolean remove(java.lang.Object value)
remove in interface java.util.Collection<java.lang.Float>remove in interface java.util.Set<java.lang.Float>remove in class java.util.AbstractCollection<java.lang.Float>value - an Object value
public java.util.Iterator<java.lang.Float> iterator()
iterator in interface java.lang.Iterable<java.lang.Float>iterator in interface java.util.Collection<java.lang.Float>iterator in interface java.util.Set<java.lang.Float>iterator in class java.util.AbstractCollection<java.lang.Float>public int size()
size in interface java.util.Collection<java.lang.Float>size in interface java.util.Set<java.lang.Float>size in class java.util.AbstractCollection<java.lang.Float>public boolean isEmpty()
isEmpty in interface java.util.Collection<java.lang.Float>isEmpty in interface java.util.Set<java.lang.Float>isEmpty in class java.util.AbstractCollection<java.lang.Float>public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<java.lang.Float>contains in interface java.util.Set<java.lang.Float>contains in class java.util.AbstractCollection<java.lang.Float>
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
|
GNU Trove | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||