class FastutilIntOpenHashSetModifiableDBIDs extends java.lang.Object implements HashSetModifiableDBIDs, IntegerDBIDs
Modifier and Type | Class and Description |
---|---|
private static class |
FastutilIntOpenHashSetModifiableDBIDs.IntOpenHashSet
Customized table.
|
protected static class |
FastutilIntOpenHashSetModifiableDBIDs.Itr
Iterator over Fastutil hashs.
|
Modifier and Type | Field and Description |
---|---|
(package private) FastutilIntOpenHashSetModifiableDBIDs.IntOpenHashSet |
store
The actual store.
|
Modifier | Constructor and Description |
---|---|
protected |
FastutilIntOpenHashSetModifiableDBIDs()
Constructor.
|
protected |
FastutilIntOpenHashSetModifiableDBIDs(DBIDs existing)
Constructor.
|
protected |
FastutilIntOpenHashSetModifiableDBIDs(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.
|
FastutilIntOpenHashSetModifiableDBIDs.Itr |
iter()
Get a DBID iterator (a more efficient API).
|
DBIDVar |
pop(DBIDVar outvar)
Pop (get and remove) one DBID from the set, into a variable.
|
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.
|
java.lang.String |
toString() |
FastutilIntOpenHashSetModifiableDBIDs.IntOpenHashSet store
protected FastutilIntOpenHashSetModifiableDBIDs(int size)
size
- Initial sizeprotected FastutilIntOpenHashSetModifiableDBIDs()
protected FastutilIntOpenHashSetModifiableDBIDs(DBIDs existing)
existing
- Existing IDspublic FastutilIntOpenHashSetModifiableDBIDs.Itr iter()
DBIDs
Example:
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
if the collection changed.public boolean removeDBIDs(DBIDs ids)
ModifiableDBIDs
removeDBIDs
in interface ModifiableDBIDs
ids
- IDs to remove.true
if the collection changed.public boolean add(DBIDRef e)
ModifiableDBIDs
add
in interface ModifiableDBIDs
e
- ID to addtrue
if the collection changed.public boolean remove(DBIDRef o)
ModifiableDBIDs
remove
in interface ModifiableDBIDs
o
- ID to removetrue
if the collection changed.public 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
public java.lang.String toString()
toString
in class java.lang.Object
public DBIDVar pop(DBIDVar outvar)
ModifiableDBIDs
pop
in interface ModifiableDBIDs
outvar
- Output variableoutvar
, for inliningCopyright © 2019 ELKI Development Team. License information.