public interface Formatter
| Modifier and Type | Field and Description |
|---|---|
static int |
VARIABLE_SCALE
Value used when setting a number format with a custom scale, indicating that the scale is variable.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
format(AccountOwner accountOwner)
Formats an account owner
|
java.lang.String |
format(java.math.BigDecimal number,
int scale)
Formats a number with the given scale
|
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
format(Object) for each element |
java.lang.String |
format(FormattableTimeBasedRate rate)
Formats a time based rate
|
java.lang.String |
format(HasMessageKey objectWithKey)
Formats an object that has a mapping to the translation message key.
|
java.lang.String |
format(HasTransactionNumber htn)
Formats an entity with transaction number
|
java.lang.String |
format(IBinaryFile file)
Formats a binary file
|
java.lang.String |
format(ICurrencyAmount currencyAmount)
Formats a currency amount
|
java.lang.String |
format(ICurrencyAmountRange range)
Formats a currency amount range
|
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(IDate date)
Formats a date as date and time
|
java.lang.String |
format(IDatePeriod period)
Formats a period
|
java.lang.String |
format(IDecimalRange range,
int scale)
Formats a decimal range with the given scale
|
java.lang.String |
format(IDimensions dimensions)
Formats a dimensions
|
java.lang.String |
format(IFileSize fileSize)
Formats a file size
|
java.lang.String |
format(IImage image)
Formats an image
|
java.lang.String |
format(ILatLong latLong)
Formats a geographical coordinate
|
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 a user profile field
|
java.lang.String |
format(Range<?> range)
Formats a range
|
java.lang.String |
format(TranslationMessageSpecification tms)
Formats a translation message
|
java.lang.String |
formatAsDate(IDate dateTime)
Formats an IDate as date
|
java.lang.String |
formatAsDate(IDatePeriod period)
Formats a period as date
|
java.lang.String |
formatAsTime(IDate dateTime)
Formats an IDate as time
|
java.lang.String |
formatDuration(java.lang.Integer duration)
Formats a duration (given in milliseconds) in a string like: 1h 12m 31s
|
java.lang.String |
formatId(IEntity entity)
Formats the entity identifier
|
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
|
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)
|
java.lang.String |
getDatePattern()
Returns the date pattern
|
java.lang.String |
getTimePattern()
Returns the time pattern
|
static final int VARIABLE_SCALE
java.lang.String format(AccountOwner accountOwner)
java.lang.String format(java.math.BigDecimal number,
int scale)
java.lang.String format(java.lang.Boolean bool)
java.lang.String format(java.util.Collection<?> list)
format(Object) for each elementjava.lang.String format(FormattableTimeBasedRate rate)
java.lang.String format(HasMessageKey objectWithKey)
java.lang.String format(HasTransactionNumber htn)
java.lang.String format(IBinaryFile file)
java.lang.String format(ICurrencyAmount currencyAmount)
java.lang.String format(ICurrencyAmountRange range)
java.lang.String format(ICustomFieldPossibleValue<?> possibleValue)
java.lang.String format(ICustomFieldValue<?,?> customFieldValue)
java.lang.String format(IDate date)
java.lang.String format(IDatePeriod period)
java.lang.String format(IDecimalRange range, int scale)
java.lang.String format(IDimensions dimensions)
java.lang.String format(IFileSize fileSize)
java.lang.String format(IImage image)
java.lang.String format(ILatLong latLong)
java.lang.String format(INamedEntity namedEntity)
java.lang.String format(java.lang.Integer number)
java.lang.String format(ITimeInterval timeInterval)
java.lang.String format(java.lang.Long number)
java.lang.String format(java.lang.Object object)
java.lang.String format(ProfileField profileField)
java.lang.String format(Range<?> range)
java.lang.String format(TranslationMessageSpecification tms)
java.lang.String formatAsDate(IDate dateTime)
java.lang.String formatAsDate(IDatePeriod period)
java.lang.String formatAsTime(IDate dateTime)
java.lang.String formatDuration(java.lang.Integer duration)
java.lang.String formatId(IEntity entity)
java.lang.String formatPercentage(java.math.BigDecimal number)
java.lang.String formatPercentage(java.math.BigDecimal number,
int scale)
java.lang.String formatPercentage(java.lang.Double number)
java.lang.String formatPercentage(java.lang.Double number,
int scale)
java.lang.String formatPercentage(java.lang.Integer value,
java.lang.Integer total)
java.lang.String formatPercentage(java.lang.Integer value,
java.lang.Integer total,
int scale)
java.lang.String formatVariables(java.lang.String text,
java.util.Map<java.lang.String,?> variables)
java.lang.String getDatePattern()
java.lang.String getTimePattern()