de.lmu.ifi.dbs.elki.utilities
Class DatabaseUtil.CollectionFromRelation<O>
java.lang.Object
java.util.AbstractCollection<O>
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 |
Methods inherited from class java.util.AbstractCollection |
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray |
db
Relation<? extends O> db
- The database we query
DatabaseUtil.CollectionFromRelation
public DatabaseUtil.CollectionFromRelation(Relation<? extends O> db)
- Constructor.
- Parameters:
db
- Database
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>