Class TimeDifferenceFormatter
java.lang.Object
com.github.toolarium.common.formatter.AbstractDifferenceFormatter
com.github.toolarium.common.formatter.TimeDifferenceFormatter
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for theTimeDifferenceFormatter.TimeDifferenceFormatter(boolean shortFormat, boolean spaceAfterValue) Constructor for theTimeDifferenceFormatter.TimeDifferenceFormatter(String pattern, boolean shortFormat, boolean spaceAfterValue) Constructor for theTimeDifferenceFormatter. -
Method Summary
Modifier and TypeMethodDescriptionformatAsString(long time) Formats the given value to a well formated stringMethods inherited from class com.github.toolarium.common.formatter.AbstractDifferenceFormatter
addResult, formatAsString, formatAsString, formatAsString, formatNumber, formatNumber, getDecimalFormatter, spaceAfterValue
-
Constructor Details
-
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
Constructor for theTimeDifferenceFormatter.- Parameters:
pattern- the patternshortFormat- enable short formatspaceAfterValue- true to have a space after the value
-
-
Method Details
-
formatAsString
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:
-