java.io.Externalizable, java.io.Serializable, java.lang.Iterable<java.lang.Integer>, java.util.Collection<java.lang.Integer>, java.util.Set<java.lang.Integer>public class TIntHashSetDecorator
extends java.util.AbstractSet<java.lang.Integer>
implements java.util.Set<java.lang.Integer>, java.io.Externalizable
| Modifier and Type | Field | Description |
|---|---|---|
protected TIntHashSet |
_set |
the wrapped primitive set
|
| Constructor | Description |
|---|---|
TIntHashSetDecorator() |
FOR EXTERNALIZATION ONLY!!
|
TIntHashSetDecorator(TIntHashSet set) |
Creates a wrapper that decorates the specified primitive set.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
add(java.lang.Integer value) |
Inserts a value into the set.
|
void |
clear() |
Empties the set.
|
TIntHashSetDecorator |
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.
|
TIntHashSet |
getSet() |
Returns a reference to the set wrapped by this decorator.
|
boolean |
isEmpty() |
Indicates whether set has any entries.
|
java.util.Iterator<java.lang.Integer> |
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 int |
unwrap(java.lang.Object value) |
Unwraps a value
|
protected java.lang.Integer |
wrap(int k) |
Wraps a value
|
void |
writeExternal(java.io.ObjectOutput out) |
addAll, contains, containsAll, retainAll, toArray, toArray, toStringprotected TIntHashSet _set
public TIntHashSetDecorator()
public TIntHashSetDecorator(TIntHashSet set)
public TIntHashSet getSet()
public TIntHashSetDecorator clone()
clone in class java.lang.Objectpublic boolean add(java.lang.Integer value)
add in interface java.util.Collection<java.lang.Integer>add in interface java.util.Set<java.lang.Integer>add in class java.util.AbstractCollection<java.lang.Integer>value - true if the set was modified by the insertionpublic boolean equals(java.lang.Object other)
equals in interface java.util.Collection<java.lang.Integer>equals in interface java.util.Set<java.lang.Integer>equals in class java.util.AbstractSet<java.lang.Integer>other - an Object valuepublic void clear()
clear in interface java.util.Collection<java.lang.Integer>clear in interface java.util.Set<java.lang.Integer>clear in class java.util.AbstractCollection<java.lang.Integer>public boolean remove(java.lang.Object value)
remove in interface java.util.Collection<java.lang.Integer>remove in interface java.util.Set<java.lang.Integer>remove in class java.util.AbstractCollection<java.lang.Integer>value - an Object valuepublic java.util.Iterator<java.lang.Integer> iterator()
iterator in interface java.util.Collection<java.lang.Integer>iterator in interface java.lang.Iterable<java.lang.Integer>iterator in interface java.util.Set<java.lang.Integer>iterator in class java.util.AbstractCollection<java.lang.Integer>public int size()
size in interface java.util.Collection<java.lang.Integer>size in interface java.util.Set<java.lang.Integer>size in class java.util.AbstractCollection<java.lang.Integer>public boolean isEmpty()
isEmpty in interface java.util.Collection<java.lang.Integer>isEmpty in interface java.util.Set<java.lang.Integer>isEmpty in class java.util.AbstractCollection<java.lang.Integer>protected java.lang.Integer wrap(int k)
k - value in the underlying setprotected int 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.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionGNU Trove is copyright ? 2001-2009 Eric D. Friedman. All Rights Reserved.