Class AbstractTimeIntervalSequence<T extends TimeInterval>

    • Constructor Detail

      • AbstractTimeIntervalSequence

        public AbstractTimeIntervalSequence()

        Constructor for TimeIntervalSequence.

      • AbstractTimeIntervalSequence

        public AbstractTimeIntervalSequence​(T interval)

        Constructor for TimeIntervalSequence.

        Parameters:
        interval - a TimeInterval object.
    • Method Detail

      • iterator

        public java.util.Iterator<T> iterator()

        iterator

        Returns:
        a Iterator object.
      • addInterval

        public void addInterval​(T interval)

        addInterval

        Parameters:
        interval - a TimeInterval object.
      • combineIntervals

        protected java.util.Collection<T> combineIntervals​(T currentInterval,
                                                           T newInterval)

        combineIntervals

        Parameters:
        currentInterval - a TimeInterval object.
        newInterval - a TimeInterval object.
        Returns:
        a Collection object.
      • createInterval

        protected abstract T createInterval​(java.util.Date start,
                                            java.util.Date end)

        createInterval

        Parameters:
        start - a Date object.
        end - a Date object.
        Returns:
        a TimeInterval object.
      • removeInterval

        public void removeInterval​(T removedInterval)

        removeInterval

        Parameters:
        removedInterval - a TimeInterval object.
      • separateIntervals

        protected java.util.Collection<T> separateIntervals​(T origInterval,
                                                            T removedInterval)

        separateIntervals

        Parameters:
        origInterval - a TimeInterval object.
        removedInterval - a TimeInterval object.
        Returns:
        a Collection object.
      • bound

        public void bound​(java.util.Date start,
                          java.util.Date end)

        bound

        Parameters:
        start - a Date object.
        end - a Date object.
      • bound

        public void bound​(T interval)

        bound

        Parameters:
        interval - a TimeInterval object.
      • getStart

        public java.util.Date getStart()

        getStart

        Returns:
        a Date object.
      • getEnd

        public java.util.Date getEnd()

        getEnd

        Returns:
        a Date object.
      • addAll

        public void addAll​(java.util.Collection<T> intervals)

        addAll

        Parameters:
        intervals - a Collection object.
      • toString

        public java.lang.String toString()

        toString

        Overrides:
        toString in class java.lang.Object
        Returns:
        a String object.