Class Time

    • Method Detail

      • getUnit

        public TimeUnit getUnit()
        Deprecated.
        Gets the time unit for this policy's time interval.
        Returns:
        The time unit for this policy's time interval.
      • getSize

        public long getSize()
        Deprecated.
        Gets the length of this policy's time interval.
        Returns:
        The length of this policy's time interval.
      • toDuration

        public java.time.Duration toDuration()
        Deprecated.
      • toMilliseconds

        public long toMilliseconds()
        Deprecated.
        Converts the time interval to milliseconds.
        Returns:
        The time interval in milliseconds.
      • toSeconds

        public long toSeconds()
        Deprecated.
        Converts the time interval to seconds.
        Returns:
        The time interval in seconds.
      • equals

        public boolean equals​(Object o)
        Deprecated.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object
      • of

        public static Time of​(long size,
                              TimeUnit unit)
        Deprecated.
        Creates a new Time of the given duration and TimeUnit.
        Parameters:
        size - The duration of time.
        unit - The unit of time of the duration, for example TimeUnit.SECONDS.
        Returns:
        The time policy.
      • milliseconds

        public static Time milliseconds​(long milliseconds)
        Deprecated.
        Creates a new Time that represents the given number of milliseconds.
      • seconds

        public static Time seconds​(long seconds)
        Deprecated.
        Creates a new Time that represents the given number of seconds.
      • minutes

        public static Time minutes​(long minutes)
        Deprecated.
        Creates a new Time that represents the given number of minutes.
      • hours

        public static Time hours​(long hours)
        Deprecated.
        Creates a new Time that represents the given number of hours.
      • days

        public static Time days​(long days)
        Deprecated.
        Creates a new Time that represents the given number of days.
      • fromDuration

        public static Time fromDuration​(java.time.Duration duration)
        Deprecated.
        Creates a new Time that represents the number of milliseconds in the given duration.