public class GenericHashSetModifiableDBIDs extends HashSet<DBID> implements HashSetModifiableDBIDs
DBIDFactory
!
Use DBIDUtil.newHashSet()
!Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
Serial version
|
Constructor and Description |
---|
GenericHashSetModifiableDBIDs()
Constructor without extra hints
|
GenericHashSetModifiableDBIDs(DBIDs c)
Constructor from existing DBIDs.
|
GenericHashSetModifiableDBIDs(int initialCapacity)
Constructor with size hint.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addDBIDs(DBIDs ids)
Add DBIDs to collection.
|
Collection<DBID> |
asCollection()
Retrieve collection access to the IDs
|
boolean |
removeDBIDs(DBIDs ids)
Remove DBIDs from collection.
|
boolean |
retainAll(DBIDs ids)
Retain all elements that also are in the second set.
|
add, clear, clone, contains, isEmpty, iterator, remove, size
equals, hashCode, removeAll
addAll, containsAll, retainAll, toArray, toArray, toString
private static final long serialVersionUID
public GenericHashSetModifiableDBIDs(int initialCapacity)
initialCapacity
- Size hintpublic GenericHashSetModifiableDBIDs()
public GenericHashSetModifiableDBIDs(DBIDs c)
c
- Existing DBIDs.public Collection<DBID> asCollection()
DBIDs
asCollection
in interface 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 retainAll(DBIDs ids)
HashSetModifiableDBIDs
retainAll
in interface HashSetModifiableDBIDs
ids
- second set