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

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

public class MergedDBIDs
extends Object
implements DBIDs, Collection<DBID>

Merge the IDs of multiple layers into one.


Field Summary
(package private)  DBIDs[] childs
          Childs to merge
 
Constructor Summary
MergedDBIDs(DBIDs... childs)
          Constructor.
 
Method Summary
 boolean add(DBID e)
           
 boolean addAll(Collection<? extends DBID> c)
           
 Collection<DBID> asCollection()
          Retrieve collection access to the IDs
 void clear()
           
 boolean contains(Object o)
          Test whether an ID is contained.
 boolean containsAll(Collection<?> c)
           
 boolean isEmpty()
          Test for an empty DBID collection.
 Iterator<DBID> iterator()
          Retrieve Iterator access to the IDs.
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 int size()
          Retrieve the collection / data size.
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Field Detail

childs

DBIDs[] childs
Childs to merge

Constructor Detail

MergedDBIDs

public MergedDBIDs(DBIDs... childs)
Constructor.

Parameters:
childs -
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

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>
Specified by:
iterator in interface Collection<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
Specified by:
size in interface Collection<DBID>
Returns:
collection size

isEmpty

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

Specified by:
isEmpty in interface DBIDs
Specified by:
isEmpty in interface Collection<DBID>
Returns:
true when empty.

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<DBID>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<DBID>

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
Specified by:
contains in interface Collection<DBID>
Parameters:
o - object to test
Returns:
true when contained

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<DBID>

clear

public void clear()
Specified by:
clear in interface Collection<DBID>

add

public boolean add(DBID e)
Specified by:
add in interface Collection<DBID>

addAll

public boolean addAll(Collection<? extends DBID> c)
Specified by:
addAll in interface Collection<DBID>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<DBID>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<DBID>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<DBID>

Release 0.4.0 (2011-09-20_1324)