de.lmu.ifi.dbs.elki.database.ids.generic
Class GenericArrayModifiableDBIDs
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<DBID>
de.lmu.ifi.dbs.elki.database.ids.generic.GenericArrayModifiableDBIDs
- All Implemented Interfaces:
- ArrayDBIDs, ArrayModifiableDBIDs, DBIDs, ModifiableDBIDs, Serializable, Cloneable, Iterable<DBID>, Collection<DBID>, List<DBID>, RandomAccess
public class GenericArrayModifiableDBIDs
- extends ArrayList<DBID>
- implements ArrayModifiableDBIDs
Array-oriented implementation of a modifiable DBID collection.
This should only be instantiated by a DBIDFactory
!
Use DBIDUtil.newArray()
!
- See Also:
- Serialized Form
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
serialVersionUID
private static final long serialVersionUID
- Serial version
- See Also:
- Constant Field Values
GenericArrayModifiableDBIDs
public GenericArrayModifiableDBIDs(int initialCapacity)
- Constructor with size hint.
- Parameters:
initialCapacity
- Size hint
GenericArrayModifiableDBIDs
public GenericArrayModifiableDBIDs()
- Constructor without extra hints
GenericArrayModifiableDBIDs
public GenericArrayModifiableDBIDs(DBIDs c)
- Constructor from existing DBIDs.
- Parameters:
c
- Existing DBIDs.
asCollection
public Collection<DBID> asCollection()
- Description copied from interface:
DBIDs
- Retrieve collection access to the IDs
- Specified by:
asCollection
in interface DBIDs
- Returns:
- a collection of IDs
addDBIDs
public boolean addDBIDs(DBIDs ids)
- Description copied from interface:
ModifiableDBIDs
- Add DBIDs to collection.
- Specified by:
addDBIDs
in interface ModifiableDBIDs
- Parameters:
ids
- IDs to add.
- Returns:
true
when modified
removeDBIDs
public boolean removeDBIDs(DBIDs ids)
- Description copied from interface:
ModifiableDBIDs
- Remove DBIDs from collection.
- Specified by:
removeDBIDs
in interface ModifiableDBIDs
- Parameters:
ids
- IDs to remove.
- Returns:
true
when modified