public class DurationLogInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected long |
amount |
protected TimeUnit |
unit |
Constructor and Description |
---|
DurationLogInfo(TimeUnit unit,
long amount)
Represents a time duration: unit and amount
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
long |
getAmount()
Amount of time.
|
TimeUnit |
getUnit()
Time unit.
|
int |
hashCode() |
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final TimeUnit unit
protected final long amount
public DurationLogInfo(TimeUnit unit, long amount)
unit
- Time unit. Must not be null
.amount
- Amount of time.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public TimeUnit getUnit()
null
.public long getAmount()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.