Class TimeDifferenceFormatter
- java.lang.Object
-
- com.github.toolarium.common.formatter.AbstractDifferenceFormatter
-
- com.github.toolarium.common.formatter.TimeDifferenceFormatter
-
public class TimeDifferenceFormatter extends AbstractDifferenceFormatter
-
-
Constructor Summary
Constructors Constructor Description TimeDifferenceFormatter()Constructor for theTimeDifferenceFormatter.TimeDifferenceFormatter(boolean shortFormat, boolean spaceAfterValue)Constructor for theTimeDifferenceFormatter.TimeDifferenceFormatter(java.lang.String pattern, boolean shortFormat, boolean spaceAfterValue)Constructor for theTimeDifferenceFormatter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringformatAsString(long time)Formats the given value to a well formated string-
Methods inherited from class com.github.toolarium.common.formatter.AbstractDifferenceFormatter
addResult, formatAsString, formatAsString, formatAsString, formatNumber, formatNumber, getDecimalFormatter, spaceAfterValue
-
-
-
-
Constructor Detail
-
TimeDifferenceFormatter
public TimeDifferenceFormatter()
Constructor for theTimeDifferenceFormatter.
-
TimeDifferenceFormatter
public TimeDifferenceFormatter(boolean shortFormat, boolean spaceAfterValue)Constructor for theTimeDifferenceFormatter.- Parameters:
shortFormat- enable short formatspaceAfterValue- true to have a space after the value
-
TimeDifferenceFormatter
public TimeDifferenceFormatter(java.lang.String pattern, boolean shortFormat, boolean spaceAfterValue)Constructor for theTimeDifferenceFormatter.- Parameters:
pattern- the patternshortFormat- enable short formatspaceAfterValue- true to have a space after the value
-
-
Method Detail
-
formatAsString
public java.lang.String formatAsString(long time)
Description copied from class:AbstractDifferenceFormatterFormats the given value to a well formated string- Specified by:
formatAsStringin classAbstractDifferenceFormatter- Parameters:
time- the value difference- Returns:
- the formated string
- See Also:
AbstractDifferenceFormatter.formatAsString(long)
-
-