public abstract class AbstractCdmFormatter extends java.lang.Object implements ICdmFormatter
ICdmFormatter.FormatKey
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<ICdmFormatter.FormatKey,java.lang.String> |
formatKeyMap |
protected ICdmFormatter.FormatKey[] |
formatKeys |
Constructor and Description |
---|
AbstractCdmFormatter(java.lang.Object object,
ICdmFormatter.FormatKey[] formatKeys) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.lang.Object object)
Returns a string representation of the given object.
Note: Only use this method if the formatKeys for this ICdmFormatter have been set before. |
java.lang.String |
format(java.lang.Object object,
ICdmFormatter.FormatKey... formatKeys)
Returns a string representation of the given object.
The is built according to the formatKeys passed as arguments. E.g. |
protected void |
initFormatKeys(java.lang.Object object) |
protected boolean |
isBlank(java.lang.String str) |
protected boolean |
isNotBlank(java.lang.String str) |
protected ICdmFormatter.FormatKey[] formatKeys
protected java.util.Map<ICdmFormatter.FormatKey,java.lang.String> formatKeyMap
public AbstractCdmFormatter(java.lang.Object object, ICdmFormatter.FormatKey[] formatKeys)
public java.lang.String format(java.lang.Object object, ICdmFormatter.FormatKey... formatKeys)
ICdmFormatter
format(derivedUnit, GATHERING_COUNTRY, COMMA, GATHERING_COLLECTOR, COMMA, OPEN_BRACKET, COLLECTION_CODE, CLOSE_BRACKET
will result in something like Peru, L. (B)
Note:format
in interface ICdmFormatter
object
- the object which should be formatted as a string representationformatKeys
- a list of enum values specifying the parts of which the string consistspublic java.lang.String format(java.lang.Object object)
ICdmFormatter
format
in interface ICdmFormatter
object
- the object which should be formatted as a string representationprotected void initFormatKeys(java.lang.Object object)
protected boolean isNotBlank(java.lang.String str)
protected boolean isBlank(java.lang.String str)
Copyright © 2007-2020 EDIT. All Rights Reserved.