Class LazyListOnCollection<E>

  • Type Parameters:
    E -
    All Implemented Interfaces:
    java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, org.eclipse.emf.common.util.EList<E>
    Direct Known Subclasses:
    LazyListOnList

    public class LazyListOnCollection<E>
    extends LazyList<E>
    LazyList that passes method calls through to the underlying Collection, where possible, instead of going via Iterators.
    • Constructor Detail

      • LazyListOnCollection

        public LazyListOnCollection​(java.util.Collection<E> dataSource)
        Creates a new LazyListOnCollection around dataSource.
        Parameters:
        dataSource - the underlying collection
    • Method Detail

      • iterator

        public java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.util.Collection<E>
        Specified by:
        iterator in interface java.lang.Iterable<E>
        Specified by:
        iterator in interface java.util.List<E>
        Overrides:
        iterator in class LazyCollection<E>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<E>
        Specified by:
        contains in interface java.util.List<E>
        Overrides:
        contains in class LazyCollection<E>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<E>
        Specified by:
        isEmpty in interface java.util.List<E>
        Overrides:
        isEmpty in class LazyCollection<E>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<E>
        Specified by:
        size in interface java.util.List<E>
        Overrides:
        size in class LazyCollection<E>