|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.util.time.TimeData
public class TimeData
User: Yohann Chastagnier Date: 14/11/13
Constructor Summary | |
---|---|
TimeData(BigDecimal time)
Hidden constructor |
|
TimeData(long time)
Hidden constructor |
Method Summary | |
---|---|
static BigDecimal |
convertTo(BigDecimal value,
TimeUnit from,
TimeUnit to)
Converting a value |
String |
getBestDisplayValue()
Gets the best display value |
String |
getBestDisplayValueOnly()
Gets the best display value |
TimeUnit |
getBestUnit()
Gets the best unit (for display as example). |
BigDecimal |
getBestValue()
Gets the best unformatted value (for display as example). |
String |
getFormattedDuration(String format)
|
String |
getFormattedDurationAsHMS()
|
String |
getFormattedDurationAsHMSM()
|
String |
getFormattedValue(TimeUnit to)
Gets the desired value with its label |
String |
getFormattedValueOnly(TimeUnit to)
Gets the desired value only |
BigDecimal |
getRoundedTimeConverted(TimeUnit to)
Gets the time converted to desired unit. |
BigDecimal |
getTime()
Gets the time in milliseconds. |
Long |
getTimeAsLong()
Gets the time in milliseconds. |
BigDecimal |
getTimeConverted(TimeUnit to)
Gets the time converted to desired unit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeData(long time)
time
- public TimeData(BigDecimal time)
time
- Method Detail |
---|
public static BigDecimal convertTo(BigDecimal value, TimeUnit from, TimeUnit to)
value
- from
- to
-
public BigDecimal getTime()
public Long getTimeAsLong()
public BigDecimal getRoundedTimeConverted(TimeUnit to)
to
-
public BigDecimal getTimeConverted(TimeUnit to)
to
-
public TimeUnit getBestUnit()
public BigDecimal getBestValue()
public String getBestDisplayValueOnly()
public String getBestDisplayValue()
public String getFormattedValueOnly(TimeUnit to)
public String getFormattedValue(TimeUnit to)
public String getFormattedDurationAsHMSM()
getFormattedDuration(String)
public String getFormattedDurationAsHMS()
getFormattedDuration(String)
public String getFormattedDuration(String format)
DurationFormatUtils.formatDuration(long, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |