Class LPTopGoalIterator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close the iterator.
      boolean hasNext()  
      boolean isReady()
      Return true if the iterator is ready to be scheduled (i.e.
      Triple next()  
      void notifyBlockedOn​(ConsumerChoicePointFrame ccp)
      Notify this context that a branch was suspended awaiting further results from the given generator.
      void notifyFinished​(ConsumerChoicePointFrame ccp)
      Notify this context that the given choice point has terminated and can be remove from the wait list.
      void remove()  
      void setReady​(ConsumerChoicePointFrame ccp)
      Directly set that this generator is ready (because the generating for one of its generatingCPs has produced new results).
      • Methods inherited from class java.lang.Object

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

        forEachRemaining
    • Constructor Detail

      • LPTopGoalIterator

        public LPTopGoalIterator​(LPInterpreter engine)
        Constructor. Wraps a top level goal state as an iterator
    • Method Detail

      • isReady

        public boolean isReady()
        Return true if the iterator is ready to be scheduled (i.e. it is not known to be complete and not known to be waiting for a dependent generator).
        Specified by:
        isReady in interface LPInterpreterContext
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<Triple>
        See Also:
        Iterator.hasNext()
      • next

        public Triple next()
        Specified by:
        next in interface java.util.Iterator<Triple>
        See Also:
        Iterator.next()
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<Triple>
        See Also:
        Iterator.remove()