public class ArrayFormatter extends Object implements IFormatter
String (elements are separated
by ARRAY_ELEMENTS_SEPARATOR escaper for the separator is
ARRAY_ELEMENTS_SEPARATOR_ESCAPER) to an array of specified type (method
parse(String)). String, in outcome result elements
will separated by ARRAY_ELEMENTS_SEPARATOR (method format(Object)).| Constructor and Description |
|---|
ArrayFormatter(IFormatter elementFormat) |
| Modifier and Type | Method and Description |
|---|---|
String |
format(Object value)
Converts an input array of elements to
. |
IFormatter |
getElementFormat() |
Object |
parse(String value) |
public ArrayFormatter(IFormatter elementFormat)
elementFormat - formatter for the component type of array.public String format(Object value)
String. Elements in the return value will separated
by ARRAY_ELEMENTS_SEPARATOR. Null safety.format in interface IFormattervalue - array of elements that should be represented as String.String representation of the income array. NULL if the income value is
NULL or if income value is not an array.public Object parse(String value)
parse in interface IFormattervalue - String representation of the array.NULL if input is empty or can`t get the component type of the array.public IFormatter getElementFormat()
Copyright © 2004–2019 OpenL Tablets. All rights reserved.