VARIABLE_SCALE| Constructor and Description |
|---|
AbstractFormatter() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
fixSignIfZero(java.lang.String formattedValue)
It removes the starting minus sign ('-') if the formatted value represents the zero number.
|
java.lang.String |
format(AccountLimitVO entry,
boolean creditLimit)
Formats an account limit as negative or positive according to the given flag
|
java.lang.String |
format(AccountOwner accountOwner)
Formats an account owner
|
java.lang.String |
format(java.lang.Boolean bool)
Formats a boolean
|
java.lang.String |
format(java.util.Collection<?> list)
Formats a collection as a comma-separated string, invoking
Formatter.format(Object) for each element |
java.lang.String |
format(DatePeriodDTO period)
Formats a period
|
java.lang.String |
format(FormattableTimeBasedRate rate)
Formats a time based rate
|
java.lang.String |
format(HasTransactionNumber htn)
Formats an entity with transaction number
|
java.lang.String |
format(ICurrencyAmount currencyAmount)
Formats a currency amount
|
java.lang.String |
format(ICustomFieldPossibleValue<?> possibleValue)
Formats a custom field possible value
|
java.lang.String |
format(ICustomFieldValue customFieldValue)
Formats a custom field value
|
java.lang.String |
format(IDimensions dimensions)
Formats a dimensions
|
java.lang.String |
format(IFileSize fileSize)
Formats a file size
|
java.lang.String |
format(INamedEntity namedEntity)
Formats a named entity
|
java.lang.String |
format(java.lang.Integer number)
Formats an integer number
|
java.lang.String |
format(ITimeInterval timeInterval)
Formats a time interval
|
java.lang.String |
format(java.lang.Long number)
Formats a long number
|
java.lang.String |
format(java.lang.Object object)
Tests the object type, invoking one of the specific format methods
|
java.lang.String |
format(ProfileField profileField)
Formats an user profile field
|
java.lang.String |
format(TranslationMessageSpecification tms)
Formats a translation message
|
java.lang.String |
formatAsDate(DatePeriodDTO period)
Formats a period as date
|
java.lang.String |
formatDuration(java.lang.Integer duration)
Formats a duration (given in milliseconds) in a string like: 1h 12m 31s
|
java.lang.String |
formatPercentage(java.math.BigDecimal number)
Formats a percentage with variable scale
|
java.lang.String |
formatPercentage(java.math.BigDecimal number,
int scale)
Formats a percentage with the given decimal fields
|
java.lang.String |
formatPercentage(java.lang.Double number)
Formats a percentage with variable scale
|
java.lang.String |
formatPercentage(java.lang.Double number,
int scale)
Formats a percentage with the given decimal digits
|
java.lang.String |
formatPercentage(java.lang.Integer value,
java.lang.Integer total)
Formats a percentage without decimal fields
|
java.lang.String |
formatPercentage(java.lang.Integer value,
java.lang.Integer total,
int scale)
Formats a percentage with the given decimal digits
|
protected java.lang.String |
formatPeriod(java.lang.String begin,
java.lang.String end) |
java.lang.String |
formatVariables(java.lang.String text,
java.util.Map<java.lang.String,?> variables)
Formats variables in form #name# with values retrieved from the given Map, keyed by the name (without #'s)
|
protected abstract java.lang.String |
message(MessageKey key,
java.lang.Object... arguments) |
protected java.math.BigDecimal |
roundHour(java.math.BigDecimal hour,
java.math.BigDecimal minutes,
java.math.BigDecimal seconds)
Rounds the given hour half up with seconds precision
|
protected Pair<java.math.BigDecimal,java.math.BigDecimal> |
splitDecimal(java.math.BigDecimal value)
Returns a pair with the integer part and the decimal part of the given number
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitformat, format, formatAsDate, formatAsTime, formatId, getDatePattern, getTimePatternpublic java.lang.String format(AccountLimitVO entry, boolean creditLimit)
public java.lang.String format(AccountOwner accountOwner)
Formatterpublic java.lang.String format(java.lang.Boolean bool)
Formatterpublic java.lang.String format(java.util.Collection<?> list)
FormatterFormatter.format(Object) for each elementpublic java.lang.String format(DatePeriodDTO period)
Formatterpublic java.lang.String format(FormattableTimeBasedRate rate)
Formatterpublic java.lang.String format(HasTransactionNumber htn)
Formatterpublic java.lang.String format(ICurrencyAmount currencyAmount)
Formatterpublic java.lang.String format(ICustomFieldPossibleValue<?> possibleValue)
Formatterpublic java.lang.String format(ICustomFieldValue customFieldValue)
Formatterpublic java.lang.String format(IDimensions dimensions)
Formatterpublic java.lang.String format(IFileSize fileSize)
Formatterpublic java.lang.String format(INamedEntity namedEntity)
Formatterpublic java.lang.String format(java.lang.Integer number)
Formatterpublic java.lang.String format(ITimeInterval timeInterval)
Formatterpublic java.lang.String format(java.lang.Long number)
Formatterpublic java.lang.String format(java.lang.Object object)
Formatterpublic java.lang.String format(ProfileField profileField)
Formatterpublic java.lang.String format(TranslationMessageSpecification tms)
Formatterpublic java.lang.String formatAsDate(DatePeriodDTO period)
FormatterformatAsDate in interface Formatterpublic java.lang.String formatDuration(java.lang.Integer duration)
FormatterformatDuration in interface Formatterpublic java.lang.String formatPercentage(java.math.BigDecimal number)
FormatterformatPercentage in interface Formatterpublic java.lang.String formatPercentage(java.math.BigDecimal number,
int scale)
FormatterformatPercentage in interface Formatterpublic java.lang.String formatPercentage(java.lang.Double number)
FormatterformatPercentage in interface Formatterpublic java.lang.String formatPercentage(java.lang.Double number,
int scale)
FormatterformatPercentage in interface Formatterpublic java.lang.String formatPercentage(java.lang.Integer value,
java.lang.Integer total)
FormatterformatPercentage in interface Formatterpublic java.lang.String formatPercentage(java.lang.Integer value,
java.lang.Integer total,
int scale)
FormatterformatPercentage in interface Formatterpublic java.lang.String formatVariables(java.lang.String text,
java.util.Map<java.lang.String,?> variables)
FormatterformatVariables in interface Formatterprotected java.lang.String fixSignIfZero(java.lang.String formattedValue)
formattedValue - an already formatted value with some scaleprotected java.lang.String formatPeriod(java.lang.String begin,
java.lang.String end)
protected abstract java.lang.String message(MessageKey key, java.lang.Object... arguments)
protected java.math.BigDecimal roundHour(java.math.BigDecimal hour,
java.math.BigDecimal minutes,
java.math.BigDecimal seconds)
protected Pair<java.math.BigDecimal,java.math.BigDecimal> splitDecimal(java.math.BigDecimal value)