| java.lang.Object com.jidesoft.converter.ArrayConverter
All known Subclasses: com.jidesoft.converter.InsetsConverter, com.jidesoft.converter.DimensionConverter, com.jidesoft.converter.RectangleConverter, com.jidesoft.converter.DefaultArrayConverter, com.jidesoft.converter.PointConverter,
ArrayConverter | abstract public class ArrayConverter implements ObjectConverter(Code) | | An abstract class that is extented by any converters that convert to/from an array-like format,
such as 1, 2, 3. Examples are Point. Point(100, 200) can convert to/from "100, 200"
You have the choice of what the separator is; separator is the ", " in the Point example above.
|
Constructor Summary | |
public | ArrayConverter(String separator, int size, Class> elementClass) Creates an ArrayConverter.
Parameters: separator - separator to separate values. | public | ArrayConverter(String separator, int size, Class>[] elementClasses) Creates an ArrayConverter.
Parameters: separator - separator to separate values. |
ArrayConverter | public ArrayConverter(String separator, int size, Class> elementClass)(Code) | | Creates an ArrayConverter.
Parameters: separator - separator to separate values. It should contain at least non-empty charactor. Parameters: size - size of the array Parameters: elementClass - class of the array element. Assume all elements have the same class type.If not, use the constructor which takes Class>[] as parameter. |
ArrayConverter | public ArrayConverter(String separator, int size, Class>[] elementClasses)(Code) | | Creates an ArrayConverter.
Parameters: separator - separator to separate values. It should contain at least non-empty charactor. Parameters: size - size of the array Parameters: elementClasses - classes of the array element. The length must be the same as size.If not, IllegalArgumentException will be thrown. |
arrayFromString | public Object[] arrayFromString(String string, ConverterContext context)(Code) | | Converts from string to an array of objects, using separator to separate the string.
Parameters: string - string to be converted Parameters: context - converter context the array |
arrayToString | public String arrayToString(Object[] objects, ConverterContext context)(Code) | | Converts from array to string by concating them with separators.
Parameters: objects - an array of objects Parameters: context - converter context string all objects concated with separators |
getElementClass | public Class> getElementClass()(Code) | | Gets the element class for the array.
the element class for the array. |
|
|