public abstract class ConvertUtils extends Object
| 构造器和说明 |
|---|
ConvertUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Object |
convert(Collection<?> collection,
Class<?> arrayType)
Returns an array object, this method converts a collection object to an
array object through the specified element type of the array.
|
static <T> T |
convert(String value,
Class<T> c) |
static <T> T |
convert(String value,
Class<T> c,
T defaultValue) |
static <T> T |
convert(String value,
String argsType) |
static <T> T |
convert(String value,
T defaultValue) |
static <T> Enumeration<T> |
enumeration(Collection<T> col) |
static Collection<Object> |
getCollectionObj(Class<?> clazz)
Returns a collection object instance by class
|
static Map<Object,Object> |
getMapObj(Class<?> clazz) |
public static <T> T convert(String value, T defaultValue)
public static Object convert(Collection<?> collection, Class<?> arrayType)
collection - The collection that needs be convertedarrayType - The element type of an arraypublic static Collection<Object> getCollectionObj(Class<?> clazz)
clazz - The class object of a collectionpublic static <T> Enumeration<T> enumeration(Collection<T> col)
Copyright © 2016. All rights reserved.