Class DateRange

  • All Implemented Interfaces:
    Serializable

    @Deprecated
    public class DateRange
    extends Object
    implements Serializable
    Deprecated.
    We can no longer use DateRange to compare dates reliably due to supporting incompatible temporal types. Use Interval instead.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int INCLUSIVE_END
      Deprecated.
      A flag indicating whether to include the end of the period in test functions.
      static int INCLUSIVE_START
      Deprecated.
      A flag indicating whether to include the start of the period in test functions.
    • Constructor Summary

      Constructors 
      Constructor Description
      DateRange​(Date start, Date end)
      Deprecated.
       
    • Field Detail

      • INCLUSIVE_START

        public static final int INCLUSIVE_START
        Deprecated.
        A flag indicating whether to include the start of the period in test functions.
        See Also:
        Constant Field Values
      • INCLUSIVE_END

        public static final int INCLUSIVE_END
        Deprecated.
        A flag indicating whether to include the end of the period in test functions.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DateRange

        public DateRange​(Date start,
                         Date end)
        Deprecated.
        Parameters:
        start - the start of the range
        end - the end of the range
    • Method Detail

      • getRangeStart

        public Date getRangeStart()
        Deprecated.
        Returns:
        the rangeStart
      • getRangeEnd

        public Date getRangeEnd()
        Deprecated.
        Returns:
        the rangeEnd
      • includes

        public final boolean includes​(Date date)
        Deprecated.
        Determines if the specified date occurs within this period (inclusive of period start and end).
        Parameters:
        date - a date to test for inclusion
        Returns:
        true if the specified date occurs within the current period
      • includes

        public final boolean includes​(Date date,
                                      int inclusiveMask)
        Deprecated.
        Decides whether a date falls within this period.
        Parameters:
        date - the date to be tested
        inclusiveMask - specifies whether period start and end are included in the calculation
        Returns:
        true if the date is in the period, false otherwise
      • before

        public final boolean before​(DateRange range)
        Deprecated.
        Decides whether this period is completed before the given period starts.
        Parameters:
        range - a period that may or may not start after this period ends
        Returns:
        true if the specified period starts after this periods ends, otherwise false
      • after

        public final boolean after​(DateRange range)
        Deprecated.
        Decides whether this period starts after the given period ends.
        Parameters:
        range - a period that may or may not end before this period starts
        Returns:
        true if the specified period end before this periods starts, otherwise false
      • intersects

        public final boolean intersects​(DateRange range)
        Deprecated.
        Decides whether this period intersects with another one.
        Parameters:
        range - a possible intersecting period
        Returns:
        true if the specified period intersects this one, false otherwise.
      • adjacent

        public final boolean adjacent​(DateRange range)
        Deprecated.
        Decides whether these periods are serial without a gap.
        Parameters:
        range - a period to test for adjacency
        Returns:
        true if one period immediately follows the other, false otherwise
      • contains

        public final boolean contains​(DateRange range)
        Deprecated.
        Decides whether the given period is completely contained within this one.
        Parameters:
        range - the period that may be contained by this one
        Returns:
        true if this period covers all the dates of the specified period, otherwise false
      • equals

        public boolean equals​(Object o)
        Deprecated.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object