public class TroveIntSet extends AbstractIntSet implements Serializable
Constructor and Description |
---|
TroveIntSet()
Creates a new, empty
TroveIntSet with the default capacity (4). |
TroveIntSet(Collection<? extends Integer> c)
Creates a new
TroveIntSet containing all the integers in the
provided collection |
TroveIntSet(int capacity)
Creates a new empty
TroveIntSet with the specified capacity. |
TroveIntSet(IntSet c)
Creates a new
TroveIntSet containing all the integers in the
provided set. |
Modifier and Type | Method and Description |
---|---|
boolean |
add(int i) |
boolean |
add(Integer i) |
boolean |
contains(int i) |
boolean |
isEmpty() |
IntIterator |
iterator() |
boolean |
remove(int i) |
int |
size() |
static IntSet |
wrap(gnu.trove.set.TIntSet set) |
addAll, containsAll, removeAll, retainAll, toPrimitiveArray
equals, hashCode, removeAll
addAll, clear, contains, containsAll, remove, retainAll, toArray, toArray, toString
public TroveIntSet()
TroveIntSet
with the default capacity (4).public TroveIntSet(int capacity)
TroveIntSet
with the specified capacity.public TroveIntSet(Collection<? extends Integer> c)
TroveIntSet
containing all the integers in the
provided collectionpublic TroveIntSet(IntSet c)
TroveIntSet
containing all the integers in the
provided set.public boolean add(Integer i)
add
in interface Collection<Integer>
add
in interface Set<Integer>
add
in class AbstractCollection<Integer>
public boolean add(int i)
add
in interface IntCollection
add
in interface IntSet
add
in class AbstractIntSet
public boolean contains(int i)
contains
in interface IntCollection
contains
in interface IntSet
public boolean isEmpty()
isEmpty
in interface Collection<Integer>
isEmpty
in interface Set<Integer>
isEmpty
in class AbstractCollection<Integer>
public IntIterator iterator()
iterator
in interface IntCollection
iterator
in interface IntSet
iterator
in interface Iterable<Integer>
iterator
in interface Collection<Integer>
iterator
in interface Set<Integer>
iterator
in class AbstractIntSet
public boolean remove(int i)
remove
in interface IntCollection
remove
in interface IntSet
remove
in class AbstractIntSet
public int size()
size
in interface Collection<Integer>
size
in interface Set<Integer>
size
in class AbstractCollection<Integer>
public static IntSet wrap(gnu.trove.set.TIntSet set)
Copyright © 2012. All Rights Reserved.