Class Duration


  • public final class Duration
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Duration​(int p_iDays, int p_iHours, int p_iMinutes, int p_iSeconds, int p_iMillis)  
      Duration​(long p_lDuration)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getDays()
      Get the days represented by this duration.
      long getFullDays()
      Get the full days represented by this duration.
      long getFullHours()
      Get the full hours represented by this duration.
      long getFullMilliseconds()
      Get the full milliseconds represented by this duration.
      long getFullMinutes()
      Get the full minutes represented by this duration.
      long getFullSeconds()
      Get the full seconds represented by this duration.
      long getHours()
      Get the hours represented by this duration without taking into account hours that are covered by full days.
      long getMilliseconds()
      Get the milliseconds represented by this duration without taking into account milliseconds that are covered by full seconds.
      long getMinutes()
      Get the minutes represented by this duration without taking into account minutes that are covered by full hours.
      long getSeconds()
      Get the seconds represented by this duration without taking into account seconds that are covered by full minutes.
    • Constructor Detail

      • Duration

        public Duration​(long p_lDuration)
      • Duration

        public Duration​(int p_iDays,
                        int p_iHours,
                        int p_iMinutes,
                        int p_iSeconds,
                        int p_iMillis)
    • Method Detail

      • getFullDays

        public long getFullDays()
        Get the full days represented by this duration.
        Returns:
        The full days represented by this duration.
      • getDays

        public long getDays()
        Get the days represented by this duration.

        This is the same as getFullDays().

        Returns:
        The days represented by this duration.
      • getFullHours

        public long getFullHours()
        Get the full hours represented by this duration.
        Returns:
        The full hours represented by this duration.
      • getHours

        public long getHours()
        Get the hours represented by this duration without taking into account hours that are covered by full days.

        Eg. from getFullHours() == 25 follows getHours() == 1.

        Returns:
        The hours represented by this duration.
      • getFullMinutes

        public long getFullMinutes()
        Get the full minutes represented by this duration.
        Returns:
        The full minutes represented by this duration.
      • getMinutes

        public long getMinutes()
        Get the minutes represented by this duration without taking into account minutes that are covered by full hours.
        Returns:
        The minutes represented by this duration.
      • getFullSeconds

        public long getFullSeconds()
        Get the full seconds represented by this duration.
        Returns:
        The full seconds represented by this duration.
      • getSeconds

        public long getSeconds()
        Get the seconds represented by this duration without taking into account seconds that are covered by full minutes.
        Returns:
        The seconds represented by this duration.
      • getFullMilliseconds

        public long getFullMilliseconds()
        Get the full milliseconds represented by this duration.
        Returns:
        The full milliseconds represented by this duration.
      • getMilliseconds

        public long getMilliseconds()
        Get the milliseconds represented by this duration without taking into account milliseconds that are covered by full seconds.
        Returns:
        The milliseconds represented by this duration.