public class ObjectUtils extends Object
Constructor and Description |
---|
ObjectUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> Collection<T> |
asCollection(Iterator<T> iterator)
Transfers the iterator to an unmodifiable collection.
|
static int[] |
asIntArray(Collection<Integer> collection) |
static <T> List<T> |
asList(Collection<T> collection) |
static <T> Collection<T> |
asOrderedCollection(Iterator<T> iterator,
Comparator<T> comparator)
Returns an unmodifiable ordered collection.
|
static <T> T |
getFirstElement(List<T> list) |
static <T> T |
getLastElement(List<T> list) |
static ThreadGroup |
getNatTableThreadGroup() |
static Date |
getRandomDate() |
static int |
getRandomNumber() |
static int |
getRandomNumber(int max) |
static <T> boolean |
isEmpty(Collection<T> collection) |
static <T> boolean |
isEmpty(String string) |
static <T> boolean |
isNotEmpty(Collection<T> collection) |
static <T> boolean |
isNotEmpty(String string) |
static boolean |
isNotNull(Object object) |
static boolean |
isNull(Object object) |
static <T> String |
toString(Collection<T> collection) |
static <T> String |
toString(T[] array) |
public static <T> Collection<T> asCollection(Iterator<T> iterator)
public static <T> List<T> asList(Collection<T> collection)
public static int[] asIntArray(Collection<Integer> collection)
public static <T> Collection<T> asOrderedCollection(Iterator<T> iterator, Comparator<T> comparator)
T
- iterator
- public static <T> String toString(Collection<T> collection)
public static <T> String toString(T[] array)
public static <T> boolean isEmpty(Collection<T> collection)
public static <T> boolean isEmpty(String string)
public static <T> boolean isNotEmpty(String string)
public static <T> boolean isNotEmpty(Collection<T> collection)
isEmpty(Collection)
public static boolean isNull(Object object)
public static boolean isNotNull(Object object)
public static Date getRandomDate()
public static int getRandomNumber()
public static ThreadGroup getNatTableThreadGroup()
public static int getRandomNumber(int max)
public static <T> T getLastElement(List<T> list)
public static <T> T getFirstElement(List<T> list)
Copyright © 2013. All Rights Reserved.