Class TimeIntervalImpl

  • All Implemented Interfaces:
    TimeInterval

    public class TimeIntervalImpl
    extends Object
    implements TimeInterval
    Author:
    Sergey.Anchipolevsky Date: 20.06.2007
    • Constructor Detail

      • TimeIntervalImpl

        public TimeIntervalImpl​(long willStartInSec,
                                @Nullable
                                Long durationSec)
      • TimeIntervalImpl

        public TimeIntervalImpl​(@NotNull
                                Date base,
                                long willStartInSec,
                                @Nullable
                                Long durationSec)
      • TimeIntervalImpl

        public TimeIntervalImpl()
        creates infinite time interval (never starts, never finishes)
    • Method Detail

      • getEndPoint

        @Nullable
        public TimePoint getEndPoint()
        Description copied from interface: TimeInterval
        Returns the ending point for the interval. May be null if the interval is open.
        Specified by:
        getEndPoint in interface TimeInterval
        Returns:
        see above
      • getDurationSeconds

        public Long getDurationSeconds()
        Description copied from interface: TimeInterval
        Returns the difference between the starting and ending points in seconds. May be null when the interval is open (no end point).
        Specified by:
        getDurationSeconds in interface TimeInterval
        Returns:
        see above
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object