public class Objects extends Object
Constructor and Description |
---|
Objects() |
Modifier and Type | Method and Description |
---|---|
static void |
assertNotNull(Object value,
String name)
Asserts whether the value is not null
|
static int |
compare(Comparable a,
Comparable b) |
static <T extends Comparable<T>> |
compare(List<T> a,
List<T> b) |
static boolean |
equal(Object a,
Object b) |
static int |
hashCode(Object... objects)
A helper class to create nice hash codes using a similar algorithm to Josh Bloch's
Effective Java book
|
static void |
notNull(Object value,
String name)
Asserts whether the value is not null
|
public static int hashCode(Object... objects)
public static int compare(Comparable a, Comparable b)
public static <T extends Comparable<T>> int compare(List<T> a, List<T> b)
public static void notNull(Object value, String name)
value
- the value to testname
- the key that resolved the valueIllegalArgumentException
- is thrown if assertion failspublic static void assertNotNull(Object value, String name)
value
- the value to testname
- the key that resolved the valueAssertionError
- is thrown if assertion failsCopyright © 2011–2015 Red Hat. All rights reserved.