public class Duration
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static long |
MILLIS_DAY |
static long |
MILLIS_HOUR |
static long |
MILLIS_MINUTE |
static long |
MILLIS_SECOND |
static java.lang.String |
NEUTRAL_DURATION_FORMAT |
Constructor and Description |
---|
Duration(long millis) |
Duration(java.lang.String durationValue) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
long |
getDurationMillis() |
int |
hashCode() |
static Duration |
parseDurationValue(java.lang.String stringValue)
Converts the given string of the format d.hh:mm:ss to a
Duration object. |
void |
setDurationMillis(long millis) |
static java.lang.String |
toDurationString(long millis)
Converts the given millisecond value to a formatted duration string
of the d.hh:mm:ss.
|
static java.lang.String |
toDurationString(long millis,
boolean withSeconds)
Converts the given millisecond value to a formatted duration string.
|
static long |
toDurationValue(java.lang.String stringValue)
Returns the duration value described by a string of the format
d.hh:MM:ss whereas hh or MM are optional
|
java.lang.String |
toString() |
public static final long MILLIS_SECOND
public static final long MILLIS_MINUTE
public static final long MILLIS_HOUR
public static final long MILLIS_DAY
public static final java.lang.String NEUTRAL_DURATION_FORMAT
public Duration(java.lang.String durationValue)
public Duration(long millis)
public long getDurationMillis()
public void setDurationMillis(long millis)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String toDurationString(long millis)
public static java.lang.String toDurationString(long millis, boolean withSeconds)
public static Duration parseDurationValue(java.lang.String stringValue)
Duration
object.public static long toDurationValue(java.lang.String stringValue)
Copyright © 2014 EsprIT-Systems. All Rights Reserved.