Class LazyBag.UnionBag<E>

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

    public static class LazyBag.UnionBag<E>
    extends LazyBag<E>
    LazyBag that implements the "union" operation.
    • Constructor Detail

    • Method Detail

      • contains

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

        public int count​(java.lang.Object object)
        Returns the number of times that object occurs in the collection self.
        Overrides:
        count in class LazyCollection<E>
        Parameters:
        object - the object to check for
        Returns:
        The number of times that object occurs in the collection self.
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<E>
        Overrides:
        isEmpty in class LazyCollection<E>
      • 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>
        Overrides:
        iterator in class LazyCollection<E>
      • size

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