public class DisplayFormatFactory
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.String,DisplayFormat> |
DISPLAY_FORMAT_CACHE
Built format cache, the key is in the
type#format form. |
| Modifier | Constructor and Description |
|---|---|
private |
DisplayFormatFactory()
Dummy constructor to disable creation of instances of this class.
|
| Modifier and Type | Method and Description |
|---|---|
static ErrorManager.ErrorEntry |
checkFormat(BaseDataType value,
java.lang.String format)
Check validness of given value from the point of view of format.
|
static DisplayFormat |
makeDefaultFormat(BaseDataType var)
Returns the default display format instance accordingly to type of the
given variable.
|
static DisplayFormat |
makeFormat(BaseDataType var,
java.lang.String pformat)
Returns the display format instance according to the type of the given
variable and the format string.
|
private static java.util.Map<java.lang.String,DisplayFormat> DISPLAY_FORMAT_CACHE
type#format form.private DisplayFormatFactory()
public static DisplayFormat makeDefaultFormat(BaseDataType var) throws ErrorConditionException, java.lang.IllegalArgumentException
var - The variable to be represented.ErrorConditionException - A format provided is invalid for the given variable object type.java.lang.IllegalArgumentException - The variable type is not supported.public static DisplayFormat makeFormat(BaseDataType var, java.lang.String pformat) throws ErrorConditionException, java.lang.IllegalArgumentException
var - The variable to be represented.pformat - Valid format string.ErrorConditionException - A format provided is invalid for the given variable object type.java.lang.IllegalArgumentException - The variable type is not supported.public static ErrorManager.ErrorEntry checkFormat(BaseDataType value, java.lang.String format)
value - Value to check.format - Format to check.