Package com.complexible.common.base
Class Duration
- java.lang.Object
-
- com.complexible.common.base.Duration
-
- All Implemented Interfaces:
java.io.Serializable
public final class Duration extends java.lang.Object implements java.io.SerializableImmutable representation of a duration.- Author:
- Evren Sirin
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)longgetMillis()inthashCode()java.lang.StringtoString()String representation of durationlongtoUnit(java.util.concurrent.TimeUnit theUnit)static DurationvalueOf(java.lang.String str)Creates a duration instance from the string.
-
-
-
Method Detail
-
getMillis
public long getMillis()
-
toUnit
public long toUnit(java.util.concurrent.TimeUnit theUnit)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
String representation of duration- Overrides:
toStringin classjava.lang.Object
-
valueOf
public static Duration valueOf(java.lang.String str)
Creates a duration instance from the string.
-
-