public class CommUtil extends Object
Modifier and Type | Field and Description |
---|---|
static Object[] |
EMPTY_ARGS |
static Class<?>[] |
EMPTY_CLAZZ |
static String |
HMAC_SHA1_ALGORITHM |
Constructor and Description |
---|
CommUtil() |
Modifier and Type | Method and Description |
---|---|
static <V> V |
cast(Object object) |
static <T> List<T> |
checkList(Object object) |
static <K,V> Map<K,V> |
checkMap(Object object) |
static <K,V> Map<K,V> |
checkMap(Object object,
Class<K> keyType,
Class<V> valueType) |
static String |
friendlyTime(long time) |
static boolean |
hasLength(CharSequence str) |
static boolean |
hasLength(String str) |
static boolean |
hasText(CharSequence str) |
static String |
hmacSha1(String data,
String key) |
static boolean |
isEmpty(Object value) |
static boolean |
isNotEmpty(Object o) |
static boolean |
isNumber(String input) |
static String |
md5(String input) |
static <K,V> String |
printMap(Map<? extends K,? extends V> theMap) |
static String |
toHexString(byte[] byteData) |
static String[] |
tokenizeToStringArray(String str,
String delimiters) |
static String[] |
tokenizeToStringArray(String str,
String delimiters,
boolean trimTokens,
boolean ignoreEmptyTokens) |
static Map<String,Object> |
toMap(Object... data) |
static String[] |
toStringArray(Collection<String> collection) |
static String |
underscore(String camelString) |
public static final Object[] EMPTY_ARGS
public static final Class<?>[] EMPTY_CLAZZ
public static final String HMAC_SHA1_ALGORITHM
public static boolean isNumber(String input)
public static <V> V cast(Object object)
public static boolean isNotEmpty(Object o)
public static boolean isEmpty(Object value)
public static String toHexString(byte[] byteData)
public static String[] tokenizeToStringArray(String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens)
public static String[] toStringArray(Collection<String> collection)
public static boolean hasLength(CharSequence str)
public static boolean hasLength(String str)
public static boolean hasText(CharSequence str)
public static String friendlyTime(long time)
Copyright © 2016 huihoo. All rights reserved.