Package mondrian.olap

Class Util.GcIterator<T>

java.lang.Object
mondrian.olap.Util.GcIterator<T>
Type Parameters:
T - Element type
All Implemented Interfaces:
Iterator<T>
Enclosing class:
Util

public static class Util.GcIterator<T> extends Object implements Iterator<T>
Garbage-collecting iterator. Iterates over a collection of references, and if any of the references has been garbage-collected, removes it from the collection.
  • Constructor Details

  • Method Details

    • over

      public static <T2> Iterable<T2> over(Iterable<? extends Reference<T2>> referenceIterable)
      Creates an iterator over a collection of references.
      Type Parameters:
      T2 - element type
      Parameters:
      referenceIterable - Collection of references
      Returns:
      iterable over collection
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public T next()
      Specified by:
      next in interface Iterator<T>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T>