public class TDoubleHashSetDecorator 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 TDoubleHashSet |
_set
the wrapped primitive set
|
| Constructor and Description |
|---|
TDoubleHashSetDecorator(TDoubleHashSet 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 double |
unwrap(Object value)
Unwraps a value
|
protected Double |
wrap(double 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 TDoubleHashSet _set
public TDoubleHashSetDecorator(TDoubleHashSet 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 Double wrap(double k)
a - value in the underlying setprotected double unwrap(Object value)
a - wrapped valueCopyright © 2019 JULIE Lab, Germany. All rights reserved.