Class DefaultIntervalLength

  • All Implemented Interfaces:
    Duration, IntervalLength

    public class DefaultIntervalLength
    extends DefaultDuration
    implements IntervalLength
    A data type for intervals of time which supports the expression of duration in terms of a specified multiple of a single unit of time.
    Author:
    Mehdi Sidhoum (Geomatys)
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultIntervalLength​(Unit unit, int radix, int factor, int value)
      Creates a new instance of IntervalUnit example : Unit="second" radix=10 factor=3 value=7 specifies a time interval length of 7ms.
    • Constructor Detail

      • DefaultIntervalLength

        public DefaultIntervalLength​(Unit unit,
                                     int radix,
                                     int factor,
                                     int value)
        Creates a new instance of IntervalUnit example : Unit="second" radix=10 factor=3 value=7 specifies a time interval length of 7ms.
    • Method Detail

      • getUnit

        public Unit getUnit()
        The unit of measure used to express the length of the interval.
        Specified by:
        getUnit in interface IntervalLength
      • getRadix

        public int getRadix()
        A positive integer that is the base of the mulitplier of the unit.
        Specified by:
        getRadix in interface IntervalLength
      • getFactor

        public int getFactor()
        The exponent of the base.
        Specified by:
        getFactor in interface IntervalLength
      • equals

        public boolean equals​(Object object)
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Overrides:
        toString in class Object