Class TimeValue


  • public final class TimeValue
    extends java.lang.Object
    Defines a time offset or interval.
    Since:
    100.3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      TimeValue​(double duration, TimeUnit timeUnit)
      Creates a new time value instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getDuration()
      Gets the length of the time value in the TimeValue's unit.
      TimeUnit getTimeUnit()
      Gets the unit of the time value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TimeValue

        public TimeValue​(double duration,
                         TimeUnit timeUnit)
        Creates a new time value instance.
        Parameters:
        duration - the duration of the time offset/interval
        timeUnit - the unit of the time offset/interval
        Throws:
        java.lang.IllegalArgumentException - if timeUnit is null
        Since:
        100.3.0
    • Method Detail

      • getDuration

        public double getDuration()
        Gets the length of the time value in the TimeValue's unit.
        Returns:
        the time length of the time interval/offset
        Since:
        100.3.0
        See Also:
        getTimeUnit()
      • getTimeUnit

        public TimeUnit getTimeUnit()
        Gets the unit of the time value.
        Returns:
        the unit of the time value.
        Since:
        100.3.0