Class RelationUtil.CollectionFromRelation<O>

  • All Implemented Interfaces:
    java.lang.Iterable<O>, java.util.Collection<O>
    Enclosing class:
    RelationUtil

    public static class RelationUtil.CollectionFromRelation<O>
    extends java.util.AbstractCollection<O>
    implements java.util.Collection<O>
    Collection view on a database that retrieves the objects when needed.
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) Relation<? extends O> db
      The database we query.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.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, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
    • Field Detail

      • db

        Relation<? extends O> db
        The database we query.
    • Constructor Detail

      • CollectionFromRelation

        public CollectionFromRelation​(Relation<? extends O> db)
        Constructor.
        Parameters:
        db - Database
    • Method Detail

      • iterator

        public java.util.Iterator<O> iterator()
        Specified by:
        iterator in interface java.util.Collection<O>
        Specified by:
        iterator in interface java.lang.Iterable<O>
        Specified by:
        iterator in class java.util.AbstractCollection<O>
      • size

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