de.lmu.ifi.dbs.elki.utilities
Class DatabaseUtil.CollectionFromRelation<O>

java.lang.Object
  extended by java.util.AbstractCollection<O>
      extended by de.lmu.ifi.dbs.elki.utilities.DatabaseUtil.CollectionFromRelation<O>
All Implemented Interfaces:
Iterable<O>, Collection<O>
Enclosing class:
DatabaseUtil

public static class DatabaseUtil.CollectionFromRelation<O>
extends AbstractCollection<O>
implements Collection<O>

Collection view on a database that retrieves the objects when needed.


Field Summary
(package private)  Relation<? extends O> db
          The database we query
 
Constructor Summary
DatabaseUtil.CollectionFromRelation(Relation<? extends O> db)
          Constructor.
 
Method Summary
 Iterator<O> iterator()
           
 int size()
           
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

db

Relation<? extends O> db
The database we query

Constructor Detail

DatabaseUtil.CollectionFromRelation

public DatabaseUtil.CollectionFromRelation(Relation<? extends O> db)
Constructor.

Parameters:
db - Database
Method Detail

iterator

public Iterator<O> iterator()
Specified by:
iterator in interface Iterable<O>
Specified by:
iterator in interface Collection<O>
Specified by:
iterator in class AbstractCollection<O>

size

public int size()
Specified by:
size in interface Collection<O>
Specified by:
size in class AbstractCollection<O>

Release 0.4.0 (2011-09-20_1324)