public class TDoubleHashSetDecorator
extends java.util.AbstractSet<java.lang.Double>
implements java.util.Set<java.lang.Double>, java.io.Externalizable
Modifier and Type | Field and Description |
---|---|
protected TDoubleHashSet |
_set
the wrapped primitive set
|
Constructor and Description |
---|
TDoubleHashSetDecorator()
FOR EXTERNALIZATION ONLY!!
|
TDoubleHashSetDecorator(TDoubleHashSet set)
Creates a wrapper that decorates the specified primitive set.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Double value)
Inserts a value into the set.
|
void |
clear()
Empties the set.
|
TDoubleHashSetDecorator |
clone()
Clones the underlying trove collection and returns the clone wrapped in a new
decorator instance.
|
boolean |
equals(java.lang.Object other)
Compares this set with another set for equality of their stored
entries.
|
TDoubleHashSet |
getSet()
Returns a reference to the set wrapped by this decorator.
|
boolean |
isEmpty()
Indicates whether set has any entries.
|
java.util.Iterator<java.lang.Double> |
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.
|
protected double |
unwrap(java.lang.Object value)
Unwraps a value
|
protected java.lang.Double |
wrap(double k)
Wraps a value
|
void |
writeExternal(java.io.ObjectOutput out) |
addAll, contains, containsAll, retainAll, toArray, toArray, toString
protected TDoubleHashSet _set
public TDoubleHashSetDecorator()
public TDoubleHashSetDecorator(TDoubleHashSet set)
public TDoubleHashSet getSet()
public TDoubleHashSetDecorator clone()
clone
in class java.lang.Object
public boolean add(java.lang.Double value)
add
in interface java.util.Collection<java.lang.Double>
add
in interface java.util.Set<java.lang.Double>
add
in class java.util.AbstractCollection<java.lang.Double>
value
- true if the set was modified by the insertionpublic boolean equals(java.lang.Object other)
equals
in interface java.util.Collection<java.lang.Double>
equals
in interface java.util.Set<java.lang.Double>
equals
in class java.util.AbstractSet<java.lang.Double>
other
- an Object
valuepublic void clear()
clear
in interface java.util.Collection<java.lang.Double>
clear
in interface java.util.Set<java.lang.Double>
clear
in class java.util.AbstractCollection<java.lang.Double>
public boolean remove(java.lang.Object value)
remove
in interface java.util.Collection<java.lang.Double>
remove
in interface java.util.Set<java.lang.Double>
remove
in class java.util.AbstractCollection<java.lang.Double>
value
- an Object
valuepublic java.util.Iterator<java.lang.Double> iterator()
iterator
in interface java.lang.Iterable<java.lang.Double>
iterator
in interface java.util.Collection<java.lang.Double>
iterator
in interface java.util.Set<java.lang.Double>
iterator
in class java.util.AbstractCollection<java.lang.Double>
public int size()
size
in interface java.util.Collection<java.lang.Double>
size
in interface java.util.Set<java.lang.Double>
size
in class java.util.AbstractCollection<java.lang.Double>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<java.lang.Double>
isEmpty
in interface java.util.Set<java.lang.Double>
isEmpty
in class java.util.AbstractCollection<java.lang.Double>
protected java.lang.Double wrap(double k)
k
- value in the underlying setprotected double unwrap(java.lang.Object value)
value
- wrapped valuepublic void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
GNU Trove is copyright © 2001-2009 Eric D. Friedman. All Rights Reserved.