Class TimeInterval

    • Constructor Detail

      • TimeInterval

        public TimeInterval​(Date start,
                            Date end)

        Constructor for TimeInterval.

        Parameters:
        start - a Date object.
        end - a Date object.
    • Method Detail

      • getStart

        public Date getStart()

        getStart

        Returns:
        a Date object.
      • getEnd

        public Date getEnd()

        getEnd

        Returns:
        a Date object.
      • comparesTo

        public int comparesTo​(Date date)
        Returns -1, 0, 1 based on how date compares to this interval
        Parameters:
        date - a Date object.
        Returns:
        -1 if the interval is entirely before date, 0 if the interval contains date, 1 if the interface entirely follows date, for these the starting date is included the ending date excluded
      • hashCode

        public int hashCode()

        hashCode

        Overrides:
        hashCode in class Object
        Returns:
        a int.
      • preceeds

        public boolean preceeds​(TimeInterval interval)
      • follows

        public boolean follows​(TimeInterval interval)
      • overlaps

        public boolean overlaps​(TimeInterval interval)