| 构造器和说明 |
|---|
ObjectUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <V> int |
compare(V v1,
V v2)
compare two object
About result
if v1 > v2, return 1
if v1 = v2, return 0
if v1 < v2, return -1
About rule
if v1 is null, v2 is null, then return 0
if v1 is null, v2 is not null, then return -1
if v1 is not null, v2 is null, then return 1
return v1.
|
static boolean |
isEquals(Object actual,
Object expected)
compare two object
|
static Integer[] |
transformIntArray(int[] source)
convert int array to Integer array
|
static int[] |
transformIntArray(Integer[] source)
convert Integer array to int array
|
static Long[] |
transformLongArray(long[] source)
convert long array to Long array
|
static long[] |
transformLongArray(Long[] source)
convert Long array to long array
|
public static boolean isEquals(Object actual, Object expected)
actual - expected - Object.equals(Object)public static Long[] transformLongArray(long[] source)
source - public static long[] transformLongArray(Long[] source)
source - public static Integer[] transformIntArray(int[] source)
source - public static int[] transformIntArray(Integer[] source)
source - public static <V> int compare(V v1,
V v2)
Comparable.compareTo(Object)v1 - v2 - Copyright © 2012-2014. All Rights Reserved.