Class Duration

java.lang.Object
ch.tocco.nice2.toolbox.api.duration.Duration
All Implemented Interfaces:
Cloneable

@Deprecated public class Duration extends Object implements Cloneable
Deprecated.
use Duration or Period if you absolutely need to work with different time units
Time amount holder class; combination of TimeUnit + int to form an amount.

Use the getters to feed all the Java-like methods that want the values as 2 separate params.

  • Constructor Details

    • Duration

      public Duration(long amount, TimeUnit unit)
      Deprecated.
  • Method Details

    • getAmount

      public long getAmount()
      Deprecated.
    • getAmount

      public long getAmount(TimeUnit unit)
      Deprecated.
    • getUnit

      public TimeUnit getUnit()
      Deprecated.
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • clone

      public Duration clone()
      Deprecated.
      Overrides:
      clone in class Object
    • equals

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

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