|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jdo.tck.util.ConversionHelper
Provides consersion functionality.
| Constructor Summary | |
ConversionHelper()
|
|
| Method Summary | |
static java.util.Map |
arrayToMap(java.lang.Object[][] array)
Converts the given array into a Map. |
static java.lang.Object |
convertObjectArrayElements(java.lang.Object object)
Recursively converts all elements of type Object[]
Collection, or Map. |
static java.lang.Object[] |
convertObjectArrayElements(java.lang.Object[] array)
Recursively converts all elements of type Object[]
in the given array and retuns that array. |
static java.util.Collection |
convertsElementsOfTypeObjectArray(java.util.Collection collection)
Returns a collection containing all elements in the given collection. |
static java.util.Map |
convertsElementsOfTypeObjectArray(java.util.Map map)
Returns a map containing all entries in the given map. |
static java.lang.String[] |
toStringArray(java.lang.Object[] array)
Converts the given array to a string array. |
static java.util.Date |
toUtilDate(java.lang.String pattern,
java.lang.String timezone,
java.util.Locale locale,
java.lang.String value)
Converts the given value to a Date. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConversionHelper()
| Method Detail |
public static java.util.Date toUtilDate(java.lang.String pattern,
java.lang.String timezone,
java.util.Locale locale,
java.lang.String value)
value to a Date.
pattern - the patterntimezone - the timezonelocale - the localevalue - the value
javax.jdo.JDOFatalException - if the conversion failspublic static java.util.Map arrayToMap(java.lang.Object[][] array)
Map.
The first dimension represents the map entries,
the second dimension holds the keys and values, e.g.
{ {"key1", "value1"}, {"key2", {"value2"} }.
array - the array
public static java.util.Collection convertsElementsOfTypeObjectArray(java.util.Collection collection)
collection.
Recursively converts all elements of type Object[]
in the given collection to collections
in the returned collection.
collection - the collection
public static java.util.Map convertsElementsOfTypeObjectArray(java.util.Map map)
map.
Recursively converts all entries having keys and/or values
of type Object[] in the given map to collections
in the returned map.
map - the map
public static java.lang.Object convertObjectArrayElements(java.lang.Object object)
Object[]
Collection, or Map.
object - the object to convert
convertObjectArrayElements(Object[]),
convertsElementsOfTypeObjectArray(Collection),
convertsElementsOfTypeObjectArray(Map)public static java.lang.Object[] convertObjectArrayElements(java.lang.Object[] array)
Object[]
in the given array and retuns that array.
array - the array
public static java.lang.String[] toStringArray(java.lang.Object[] array)
array to a string array.
array - the object array
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||