Package ic211

Class TweetQueue.Iter

  • Enclosing class:
    TweetQueue

    protected class TweetQueue.Iter
    extends Object
    This class provides basic iterator functionality to iterate over the elements in the Queue without changing the Queue. The intent is to provide flexibility for adding more functionality through inheritance.
    • Constructor Detail

      • Iter

        public Iter​(ic211.TweetQueue.Node start)
    • Method Detail

      • hasNext

        public boolean hasNext()
        This method is used to determine whether the iterator has reached the end of the Queue.
        Returns:
        true if the iterator has not reached the end of the Queue
      • next

        public Tweet next()
        Returns the next Tweet in the Queue. Note: this means calling it consecutively generally gives different results.
        Returns:
        the next Tweet in the Queue