de.lmu.ifi.dbs.elki.database.ids.generic
Class GenericTreeSetModifiableDBIDs

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.TreeSet<DBID>
              extended by de.lmu.ifi.dbs.elki.database.ids.generic.GenericTreeSetModifiableDBIDs
All Implemented Interfaces:
DBIDs, ModifiableDBIDs, SetDBIDs, TreeSetDBIDs, TreeSetModifiableDBIDs, Serializable, Cloneable, Iterable<DBID>, Collection<DBID>, NavigableSet<DBID>, Set<DBID>, SortedSet<DBID>

public class GenericTreeSetModifiableDBIDs
extends TreeSet<DBID>
implements TreeSetModifiableDBIDs

Set-oriented implementation of a modifiable DBID collection. This should only be instantiated by a DBIDFactory! Use DBIDUtil.newTreeSet()!

See Also:
Serialized Form

Field Summary
private static long serialVersionUID
          Serial version
 
Constructor Summary
GenericTreeSetModifiableDBIDs()
          Constructor without extra hints
GenericTreeSetModifiableDBIDs(DBIDs c)
          Constructor from existing DBIDs.
GenericTreeSetModifiableDBIDs(int initialCapacity)
          Constructor with size hint.
 
Method Summary
 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.
 
Methods inherited from class java.util.TreeSet
add, addAll, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, subSet, subSet, tailSet, tailSet
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.database.ids.DBIDs
contains, isEmpty, size
 
Methods inherited from interface java.util.NavigableSet
ceiling, descendingIterator, descendingSet, floor, headSet, headSet, higher, iterator, lower, pollFirst, pollLast, subSet, subSet, tailSet, tailSet
 
Methods inherited from interface java.util.SortedSet
comparator, first, last
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial version

See Also:
Constant Field Values
Constructor Detail

GenericTreeSetModifiableDBIDs

public GenericTreeSetModifiableDBIDs(int initialCapacity)
Constructor with size hint.

Parameters:
initialCapacity - Size hint

GenericTreeSetModifiableDBIDs

public GenericTreeSetModifiableDBIDs()
Constructor without extra hints


GenericTreeSetModifiableDBIDs

public GenericTreeSetModifiableDBIDs(DBIDs c)
Constructor from existing DBIDs.

Parameters:
c - Existing DBIDs.
Method Detail

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

Release 0.4.0 (2011-09-20_1324)