Package snap.props
Class StringCodec
java.lang.Object
snap.props.StringCodec
A class to convert common types to/from Strings.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
An interface for classes that know how to code/decode themselves. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncodeString
(Object anObj) Returns a String for given object.<T> T
decodeString
(String aString, Class<T> aClass) Returns an Object for given String and class.Returns set of classes that can be converted to/from String.Returns set of classes that can be converted to/from String.static double[]
Returns an array of double values for given comma separated string.static String[]
Returns an array of String values for given comma separated string.getStringForDoubleArray
(double[] theValues) Return string for double array.boolean
isCodeable
(Object anObj) Returns whether given object can be converted to/from String.boolean
isCodeableClass
(Class<?> aClass) Returns whether given object can be converted to/from String.
-
Field Details
-
SHARED
-
-
Constructor Details
-
StringCodec
public StringCodec()
-
-
Method Details
-
isCodeable
Returns whether given object can be converted to/from String. -
isCodeableClass
Returns whether given object can be converted to/from String. -
getCodeableClasses
Returns set of classes that can be converted to/from String. -
getCodeableClassesImpl
Returns set of classes that can be converted to/from String. -
codeString
Returns a String for given object. -
decodeString
Returns an Object for given String and class. -
getStringArrayForString
Returns an array of String values for given comma separated string. -
getStringForDoubleArray
Return string for double array. -
getDoubleArrayForString
Returns an array of double values for given comma separated string.
-