|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.devexperts.util.TimePeriod
public class TimePeriod
Value class for period of time with support for ISO8601 duration format.
Constructor Summary | |
---|---|
protected |
TimePeriod(long value)
|
protected |
TimePeriod(String value)
|
Method Summary | |
---|---|
boolean |
equals(Object o)
|
long |
getNanos()
Returns value in nanoseconds. |
long |
getTime()
Returns value in milliseconds. |
int |
hashCode()
|
String |
toString()
|
static TimePeriod |
valueOf(long value)
Returns TimePeriod with value milliseconds. |
static TimePeriod |
valueOf(String value)
Returns TimePeriod represented with a given string. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected TimePeriod(long value)
protected TimePeriod(String value) throws InvalidFormatException
InvalidFormatException
Method Detail |
---|
public static TimePeriod valueOf(long value)
TimePeriod
with value milliseconds.
value
- value in milliseconds
TimePeriod
with value milliseconds.public static TimePeriod valueOf(String value) throws InvalidFormatException
TimePeriod
represented with a given string.
Allowable format is ISO8601 duration, but there are some simplifications and modifications available:
value
- string representation
TimePeriod
represented with a given string.
InvalidFormatException
- if cannot parse valuepublic String toString()
toString
in class Object
public long getTime()
public long getNanos()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |