Class DateUtils.DateIterator

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

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

    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.util.Calendar next()
      Returns 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 (inclusive)
    • Method Detail

      • hasNext

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

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

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