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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.database.ids.generic.UnmodifiableDBIDs
All Implemented Interfaces:
DBIDs, StaticDBIDs, Iterable<DBID>

public class UnmodifiableDBIDs
extends Object
implements StaticDBIDs

Unmodifiable wrapper for DBIDs.


Field Summary
private  DBIDs inner
          The DBIDs we wrap.
 
Constructor Summary
UnmodifiableDBIDs(DBIDs inner)
          Constructor.
 
Method Summary
 Collection<DBID> asCollection()
          Retrieve collection access to the IDs
 boolean contains(Object o)
          Test whether an ID is contained.
 boolean isEmpty()
          Test for an empty DBID collection.
 Iterator<DBID> iterator()
          Retrieve Iterator access to the IDs.
 int size()
          Retrieve the collection / data size.
 String toString()
          Returns a string representation of the inner DBID collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inner

private final DBIDs inner
The DBIDs we wrap.

Constructor Detail

UnmodifiableDBIDs

public UnmodifiableDBIDs(DBIDs inner)
Constructor.

Parameters:
inner - Inner DBID collection.
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

contains

public boolean contains(Object o)
Description copied from interface: DBIDs
Test whether an ID is contained. Signature compatible with Collection.

Specified by:
contains in interface DBIDs
Parameters:
o - object to test
Returns:
true when contained

isEmpty

public boolean isEmpty()
Description copied from interface: DBIDs
Test for an empty DBID collection.

Specified by:
isEmpty in interface DBIDs
Returns:
true when empty.

iterator

public Iterator<DBID> iterator()
Description copied from interface: DBIDs
Retrieve Iterator access to the IDs.

Specified by:
iterator in interface DBIDs
Specified by:
iterator in interface Iterable<DBID>
Returns:
an iterator for the IDs

size

public int size()
Description copied from interface: DBIDs
Retrieve the collection / data size.

Specified by:
size in interface DBIDs
Returns:
collection size

toString

public String toString()
Returns a string representation of the inner DBID collection.

Overrides:
toString in class Object

Release 0.4.0 (2011-09-20_1324)