Class MonthSpan



  • public class MonthSpan
    extends Object
    • Constructor Summary

      Constructors

      Constructor and Description
      MonthSpan(int year, int month, int numMonths)
      Create a new span of months with the specified bounds.
      MonthSpan(org.joda.time.YearMonth limitLower, int numMonths)
      Create a new span of months with the specified bounds.
      MonthSpan(org.joda.time.YearMonth limitLower, org.joda.time.YearMonth limitUpper)
      Create a new span of months with the specified bounds.
    • Constructor Detail

      • MonthSpan

        public MonthSpan(org.joda.time.YearMonth limitLower,
                         org.joda.time.YearMonth limitUpper)
        Create a new span of months with the specified bounds.
        Parameters:
        limitLower - the lower limit, inclusive
        limitUpper - the upper limit, exclusive
      • MonthSpan

        public MonthSpan(org.joda.time.YearMonth limitLower,
                         int numMonths)
        Create a new span of months with the specified bounds.
        Parameters:
        limitLower - the lower limit, inclusive
        numMonths - the number of months to span
      • MonthSpan

        public MonthSpan(int year,
                         int month,
                         int numMonths)
        Create a new span of months with the specified bounds.
        Parameters:
        year - the year of the first month
        month - the month of year of the first month
        numMonths - the number of months to span
    • Method Detail

      • contains

        public boolean contains(org.joda.time.YearMonth month)
        Returns:
        whether the specified month is within this span.
      • toInterval

        public org.joda.time.Interval toInterval()
      • isEmpty

        public boolean isEmpty()
      • length

        public int length()
      • getStart

        public org.joda.time.YearMonth getStart()
      • getEnd

        public org.joda.time.YearMonth getEnd()
      • iterateMonths

        public Iterable<org.joda.time.YearMonth> iterateMonths()