Class ChainedInstanceIterator

  • All Implemented Interfaces:
    java.util.Iterator<Instance>

    @Deprecated
    public abstract class ChainedInstanceIterator
    extends java.lang.Object
    implements java.util.Iterator<Instance>
    Deprecated.
    Under development, and not sure we actually want to have a class list this. It seems quite dangerous, and error-prone.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      abstract boolean hasNext()
      Deprecated.
       
      abstract Instance next()
      Deprecated.
       
      void remove()
      Deprecated.
       
      boolean sourceNowHasNext​(java.util.Iterator<Instance> source)
      Deprecated.
      The "source" of this iterator sends this message to tell this iterator that, even though source.hasNext() may have returned false before, it would now return true.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • ChainedInstanceIterator

        public ChainedInstanceIterator​(java.util.Iterator<Instance> source,
                                       ChainedInstanceIterator target)
        Deprecated.
        Both source and target may be null.
    • Method Detail

      • next

        public abstract Instance next()
        Deprecated.
        Specified by:
        next in interface java.util.Iterator<Instance>
      • hasNext

        public abstract boolean hasNext()
        Deprecated.
        Specified by:
        hasNext in interface java.util.Iterator<Instance>
      • remove

        public void remove()
        Deprecated.
        Specified by:
        remove in interface java.util.Iterator<Instance>
      • sourceNowHasNext

        public boolean sourceNowHasNext​(java.util.Iterator<Instance> source)
        Deprecated.
        The "source" of this iterator sends this message to tell this iterator that, even though source.hasNext() may have returned false before, it would now return true. Note that not all iterators handle this strange situation in which an iterator indicates that hasNext is false, but then later hasNext becomes true. In particular, if this iterator has also returned false for hasNext() to its consumer, but is now ready to provide more since its source now hasNext(), the consumer may not properly handle this situation. (One possible solution: create a ChainedIterator interface, and be more strict about type-checking all sources and targets of these kinds of iterators. -akm) (Also consider passing the source as an argument here.)