Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.data
Class DatabaseObjectGroupCollection<C extends Collection<Integer>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.data.DatabaseObjectGroupCollection<C>
Type Parameters:
C - Collection type used.
All Implemented Interfaces:
DatabaseObjectGroup, Iterable<Integer>

public final class DatabaseObjectGroupCollection<C extends Collection<Integer>>
extends Object
implements DatabaseObjectGroup

Collection-backed group of database object (references)

Author:
Erich Schubert

Field Summary
 C ids
          Storage for ids.
 
Constructor Summary
DatabaseObjectGroupCollection(C ids)
          Constructor to wrap an existing collection.
 
Method Summary
 C getIDs()
          Retrieve the IDs as collection.
 Iterator<Integer> iterator()
          Retrieve an iterator over the IDs.
 int size()
          Return the backing collections size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ids

public C extends Collection<Integer> ids
Storage for ids.

Constructor Detail

DatabaseObjectGroupCollection

public DatabaseObjectGroupCollection(C ids)
Constructor to wrap an existing collection. The collection is not copied, but referenced!

Parameters:
ids - collection to use.
Method Detail

getIDs

public C getIDs()
Retrieve the IDs as collection.

Specified by:
getIDs in interface DatabaseObjectGroup
Returns:
a collection of IDs

iterator

public Iterator<Integer> iterator()
Retrieve an iterator over the IDs.

Specified by:
iterator in interface DatabaseObjectGroup
Specified by:
iterator in interface Iterable<Integer>
Returns:
an iterator for the IDs

size

public int size()
Return the backing collections size.

Specified by:
size in interface DatabaseObjectGroup
Returns:
collection size

Release 0.2.1 (2009-07-13_1605)