class TroveHashSetModifiableDBIDs extends Object implements HashSetModifiableDBIDs
Modifier and Type | Class and Description |
---|---|
protected static class |
TroveHashSetModifiableDBIDs.DBIDItr
Iterator over trove hashs.
|
Modifier and Type | Field and Description |
---|---|
(package private) gnu.trove.set.hash.TIntHashSet |
store
The actual store.
|
Modifier | Constructor and Description |
---|---|
protected |
TroveHashSetModifiableDBIDs()
Constructor.
|
protected |
TroveHashSetModifiableDBIDs(DBIDs existing)
Constructor.
|
protected |
TroveHashSetModifiableDBIDs(int size)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(DBID e)
Add a single DBID to the collection.
|
boolean |
addDBIDs(DBIDs ids)
Add DBIDs to collection.
|
void |
clear()
Clear this collection.
|
boolean |
contains(DBID o)
Test whether an ID is contained.
|
boolean |
isEmpty()
Test for an empty DBID collection.
|
DBIDIter |
iter()
Get a DBIDIterator (a more efficient API).
|
Iterator<DBID> |
iterator()
Retrieve Iterator access to the IDs.
|
boolean |
remove(DBID o)
Remove a single DBID from the collection.
|
boolean |
removeDBIDs(DBIDs ids)
Remove DBIDs from collection.
|
boolean |
retainAll(DBIDs set)
Retain all elements that also are in the second set.
|
int |
size()
Retrieve the collection / data size.
|
protected TroveHashSetModifiableDBIDs(int size)
size
- Initial sizeprotected TroveHashSetModifiableDBIDs()
protected TroveHashSetModifiableDBIDs(DBIDs existing)
existing
- Existing IDspublic DBIDIter iter()
DBIDs
public boolean addDBIDs(DBIDs ids)
ModifiableDBIDs
addDBIDs
in interface ModifiableDBIDs
ids
- IDs to add.true
when modifiedpublic boolean removeDBIDs(DBIDs ids)
ModifiableDBIDs
removeDBIDs
in interface ModifiableDBIDs
ids
- IDs to remove.true
when modifiedpublic boolean add(DBID e)
ModifiableDBIDs
add
in interface ModifiableDBIDs
e
- ID to addpublic boolean remove(DBID o)
ModifiableDBIDs
remove
in interface ModifiableDBIDs
o
- ID to removepublic boolean retainAll(DBIDs set)
HashSetModifiableDBIDs
retainAll
in interface HashSetModifiableDBIDs
set
- second setpublic Iterator<DBID> iterator()
DBIDs
public int size()
DBIDs
public boolean isEmpty()
DBIDs
public void clear()
ModifiableDBIDs
clear
in interface ModifiableDBIDs