public class TFloatHashSetDecorator 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 2002| Modifier and Type | Field and Description |
|---|---|
protected TFloatHashSet |
_set
the wrapped primitive set
|
| Constructor and Description |
|---|
TFloatHashSetDecorator(TFloatHashSet set)
Creates a wrapper that decorates the specified primitive set.
|
| Modifier and Type | Method and Description |
|---|---|
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 float |
unwrap(Object value)
Unwraps a value
|
protected Float |
wrap(float k)
Wraps a value
|
hashCode, removeAlladdAll, contains, containsAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, contains, containsAll, hashCode, removeAll, retainAll, spliterator, toArray, toArrayparallelStream, removeIf, streamprotected final TFloatHashSet _set
public TFloatHashSetDecorator(TFloatHashSet set)
public boolean add(Object value)
add in interface Collectionadd in interface Setadd in class AbstractCollectiontrue - if the set was modified by the insertionpublic boolean equals(Object other)
equals in interface Collectionequals in interface Setequals in class AbstractSetother - an Object valuepublic void clear()
clear in interface Collectionclear in interface Setclear in class AbstractCollectionpublic boolean remove(Object value)
remove in interface Collectionremove in interface Setremove in class AbstractCollectionvalue - an Object valuepublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Setiterator in class AbstractCollectionpublic int size()
size in interface Collectionsize in interface Setsize in class AbstractCollectionpublic boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface SetisEmpty in class AbstractCollectionprotected Float wrap(float k)
a - value in the underlying setprotected float unwrap(Object value)
a - wrapped valueCopyright © 2019 JULIE Lab, Germany. All rights reserved.