public class TUtil extends Object
Constructor and Description |
---|
TUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
arrayToString(Object[] objects) |
static boolean |
checkEquals(Object[] s1,
Object[] s2)
check two arrays as equals.
|
static boolean |
checkEquals(Object s1,
Object s2)
check two objects as equals.
|
static <T> T |
checkNotNull(T reference)
It check if T is null or not.
|
static String |
collectionToString(Collection objects) |
static <T> T[] |
concat(T[] first,
T[] second) |
static <T> T[] |
concatAll(T[] first,
T[]... rest) |
static String |
getCurrentCodePoint(int depth)
It returns the exact code point at which this running thread is executed.
|
static <K,V> Map<K,V> |
newConcurrentHashMap() |
static <K,V> Map<K,V> |
newHashMap() |
static <K,V> Map<K,V> |
newHashMap(K k,
V v) |
static <K,V> Map<K,V> |
newHashMap(Map<K,V> map) |
static <T> Set<T> |
newHashSet() |
static <T> Set<T> |
newHashSet(T... items) |
static <K,V> Map<K,V> |
newLinkedHashMap() |
static <K,V> Map<K,V> |
newLinkedHashMap(K k,
V v) |
static <T> List<T> |
newList() |
static <T> List<T> |
newList(Collection<T> items) |
static <T> List<T> |
newList(T... items) |
static <KEY1,VALUE> |
putCollectionToNestedList(Map<KEY1,List<VALUE>> map,
KEY1 k1,
Collection<VALUE> list) |
static <KEY1,VALUE> |
putToNestedList(Map<KEY1,List<VALUE>> map,
KEY1 k1,
VALUE value) |
static <KEY1,KEY2,VALUE> |
putToNestedMap(Map<KEY1,Map<KEY2,VALUE>> map,
KEY1 k1,
KEY2 k2,
VALUE value) |
static <T> T[] |
toArray(Collection<T> collection,
Class<T> type) |
public static boolean checkEquals(Object s1, Object s2)
s1
- the first object to be compared.s2
- the second object to be comparedpublic static boolean checkEquals(Object[] s1, Object[] s2)
s1
- the first array to be compared.s2
- the second array to be comparedpublic static <T> T[] concat(T[] first, T[] second)
public static <T> T[] concatAll(T[] first, T[]... rest)
public static <T> Set<T> newHashSet()
public static <T> Set<T> newHashSet(T... items)
public static <K,V> Map<K,V> newHashMap()
public static <K,V> Map<K,V> newHashMap(K k, V v)
public static <K,V> Map<K,V> newLinkedHashMap()
public static <K,V> Map<K,V> newLinkedHashMap(K k, V v)
public static <K,V> Map<K,V> newConcurrentHashMap()
public static <T> List<T> newList()
public static <T> List<T> newList(T... items)
public static <T> List<T> newList(Collection<T> items)
public static <T> T checkNotNull(T reference)
T
- The object typereference
- the object reference to be checkedpublic static <KEY1,VALUE> void putToNestedList(Map<KEY1,List<VALUE>> map, KEY1 k1, VALUE value)
public static <KEY1,VALUE> void putCollectionToNestedList(Map<KEY1,List<VALUE>> map, KEY1 k1, Collection<VALUE> list)
public static <KEY1,KEY2,VALUE> void putToNestedMap(Map<KEY1,Map<KEY2,VALUE>> map, KEY1 k1, KEY2 k2, VALUE value)
public static String collectionToString(Collection objects)
public static <T> T[] toArray(Collection<T> collection, Class<T> type)
public static String getCurrentCodePoint(int depth)
depth
- in the call stack (0 means current method, 1 means call method, ...)Copyright © 2014 Apache Software Foundation. All Rights Reserved.