public abstract class AbstractStringFormatter extends Object implements IFormatter
IFormatter interface that provides
the common functionality.| Constructor and Description |
|---|
AbstractStringFormatter()
Default constructor
|
AbstractStringFormatter(IFormatter aPrevFormatter) |
| Modifier and Type | Method and Description |
|---|---|
String |
getFormattedValue(Object aValue)
Convert the passed value to a formatted string according to the pattern.
|
protected abstract String |
getFormattedValueAsString(Object aValue)
Convert the passed value from Object to formatted String.
|
protected String |
getValueAsString(Object aValue)
Convert the source value to a string by using the
TypeConverter. |
String |
toString() |
public AbstractStringFormatter()
public AbstractStringFormatter(@Nullable IFormatter aPrevFormatter)
aPrevFormatter - Optional previous formatter to be invoked, before this formatter is
invoked. May be null.@OverrideOnDemand @Nonnull protected String getValueAsString(@Nullable Object aValue)
TypeConverter.aValue - The value to be converted to a stringnull
.@Nullable protected abstract String getFormattedValueAsString(@Nullable Object aValue)
getValueAsString(Object) in implementations of this method to do
the base conversion from Object to String.aValue - The source object. May be null.@Nullable public final String getFormattedValue(@Nullable Object aValue)
IFormattergetFormattedValue in interface IFormatteraValue - The source value to be formatted. May be null.null.Copyright © 2006–2014 phloc systems. All rights reserved.