Class DateUtils.DateIterator

  • All Implemented Interfaces:
    java.util.Iterator
    Enclosing class:
    DateUtils

    static class DateUtils.DateIterator
    extends java.lang.Object
    implements java.util.Iterator

    Date iterator.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Calendar endFinal  
      private java.util.Calendar spot  
    • Constructor Summary

      Constructors 
      Constructor Description
      DateIterator​(java.util.Calendar startFinal, java.util.Calendar endFinal)
      Constructs a DateIterator that ranges from one date to another.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Has the iterator not reached the end date yet?
      java.lang.Object next()
      Return the next calendar in the iteration
      void remove()
      Always throws UnsupportedOperationException.
      • 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
    • Field Detail

      • endFinal

        private final java.util.Calendar endFinal
      • spot

        private final java.util.Calendar spot
    • Constructor Detail

      • DateIterator

        DateIterator​(java.util.Calendar startFinal,
                     java.util.Calendar endFinal)
        Constructs a DateIterator that ranges from one date to another.
        Parameters:
        startFinal - start date (inclusive)
        endFinal - end date (not inclusive)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Has the iterator not reached the end date yet?
        Specified by:
        hasNext in interface java.util.Iterator
        Returns:
        true if the iterator has yet to reach the end date
      • next

        public java.lang.Object next()
        Return the next calendar in the iteration
        Specified by:
        next in interface java.util.Iterator
        Returns:
        Object calendar for the next date
      • remove

        public void remove()
        Always throws UnsupportedOperationException.
        Specified by:
        remove in interface java.util.Iterator
        Throws:
        java.lang.UnsupportedOperationException
        See Also:
        Iterator.remove()