Class Interval


  • public class Interval
    extends java.lang.Object
    A class that represents an interval for a timed element.
    Version:
    $Id: Interval.java 1804130 2017-08-04 14:41:11Z ssteiner $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected float begin
      The begin time for the interval.
      protected java.util.LinkedList beginDependents
      The list of InstanceTime objects that are dependent on the begin time of this Interval.
      protected InstanceTime beginInstanceTime
      The InstanceTime that defined the begin time of the current interval.
      protected float end
      The end time for the interval.
      protected java.util.LinkedList endDependents
      The list of InstanceTime objects that are dependent on the end time of this Interval.
      protected InstanceTime endInstanceTime
      The InstanceTime that defined the end time of the current interval.
    • Constructor Summary

      Constructors 
      Constructor Description
      Interval​(float begin, float end, InstanceTime beginInstanceTime, InstanceTime endInstanceTime)
      Creates a new Interval.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void addDependent​(InstanceTime dependent, boolean forBegin)
      Adds a dependent InstanceTime for this Interval.
      float getBegin()
      Returns the begin time of this interval.
      InstanceTime getBeginInstanceTime()
      Returns the InstanceTime that defined the begin time of this interval.
      float getEnd()
      Returns the end time of this interval.
      InstanceTime getEndInstanceTime()
      Returns the InstanceTime that defined the end time of this interval.
      (package private) void removeDependent​(InstanceTime dependent, boolean forBegin)
      Removes a dependent InstanceTime for this Interval.
      (package private) float setBegin​(float begin)
      Updates the begin time for this interval.
      (package private) float setEnd​(float end, InstanceTime endInstanceTime)
      Updates the end time for this interval.
      java.lang.String toString()
      Returns a string representation of this Interval.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • begin

        protected float begin
        The begin time for the interval.
      • end

        protected float end
        The end time for the interval.
      • beginInstanceTime

        protected InstanceTime beginInstanceTime
        The InstanceTime that defined the begin time of the current interval.
      • endInstanceTime

        protected InstanceTime endInstanceTime
        The InstanceTime that defined the end time of the current interval.
      • beginDependents

        protected java.util.LinkedList beginDependents
        The list of InstanceTime objects that are dependent on the begin time of this Interval.
      • endDependents

        protected java.util.LinkedList endDependents
        The list of InstanceTime objects that are dependent on the end time of this Interval.
    • Constructor Detail

      • Interval

        public Interval​(float begin,
                        float end,
                        InstanceTime beginInstanceTime,
                        InstanceTime endInstanceTime)
        Creates a new Interval.
        Parameters:
        begin - the begin time of the Interval
        end - the end time of the Interval
        beginInstanceTime - the InstanceTime object that defined the begin time of the Interval
        endInstanceTime - the InstanceTime object that defined the end time of the Interval
    • Method Detail

      • toString

        public java.lang.String toString()
        Returns a string representation of this Interval.
        Overrides:
        toString in class java.lang.Object
      • getBegin

        public float getBegin()
        Returns the begin time of this interval.
      • getEnd

        public float getEnd()
        Returns the end time of this interval.
      • getBeginInstanceTime

        public InstanceTime getBeginInstanceTime()
        Returns the InstanceTime that defined the begin time of this interval.
      • getEndInstanceTime

        public InstanceTime getEndInstanceTime()
        Returns the InstanceTime that defined the end time of this interval.
      • addDependent

        void addDependent​(InstanceTime dependent,
                          boolean forBegin)
        Adds a dependent InstanceTime for this Interval.
      • removeDependent

        void removeDependent​(InstanceTime dependent,
                             boolean forBegin)
        Removes a dependent InstanceTime for this Interval.
      • setBegin

        float setBegin​(float begin)
        Updates the begin time for this interval.
      • setEnd

        float setEnd​(float end,
                     InstanceTime endInstanceTime)
        Updates the end time for this interval.