class TroveHashSetModifiableDBIDs extends Object implements HashSetModifiableDBIDs, IntegerDBIDs
Modifier and Type | Class and Description |
---|---|
protected static class |
TroveHashSetModifiableDBIDs.Itr
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(DBIDRef e)
Add a single DBID to the collection.
|
boolean |
addDBIDs(DBIDs ids)
Add DBIDs to collection.
|
void |
clear()
Clear this collection.
|
boolean |
contains(DBIDRef o)
Test whether an ID is contained.
|
boolean |
isEmpty()
Test for an empty DBID collection.
|
TroveHashSetModifiableDBIDs.Itr |
iter()
Get a DBID iterator (a more efficient API).
|
boolean |
remove(DBIDRef 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.
|
String |
toString() |
protected TroveHashSetModifiableDBIDs(int size)
size
- Initial sizeprotected TroveHashSetModifiableDBIDs()
protected TroveHashSetModifiableDBIDs(DBIDs existing)
existing
- Existing IDspublic TroveHashSetModifiableDBIDs.Itr iter()
DBIDs
for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
DBID id = iter.getDBID();
}
iter
in interface DBIDs
iter
in interface HashSetModifiableDBIDs
iter
in interface IntegerDBIDs
iter
in interface ModifiableDBIDs
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(DBIDRef e)
ModifiableDBIDs
add
in interface ModifiableDBIDs
e
- ID to addpublic boolean remove(DBIDRef o)
ModifiableDBIDs
remove
in interface ModifiableDBIDs
o
- ID to removepublic boolean retainAll(DBIDs set)
HashSetModifiableDBIDs
retainAll
in interface HashSetModifiableDBIDs
set
- second setpublic int size()
DBIDs
public boolean isEmpty()
DBIDs
public void clear()
ModifiableDBIDs
clear
in interface ModifiableDBIDs
public boolean contains(DBIDRef o)
DBIDs