public class Tests extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends Comparable<? super T>> |
testComparable(T o,
T smaller,
T equal,
T greater) |
static <T extends Comparable<? super T>> |
testComparableConsistentWithEquals(T o,
T smaller,
T equal,
T greater) |
static <T> void |
testComparator(Comparator<? super T> comparator,
T o,
T smaller,
T equal,
T greater,
boolean nullValueSupported) |
static <T> void |
testComparatorConsistentWithEquals(Comparator<? super T> comparator,
T o,
T smaller,
T equal,
T greater,
boolean nullValueSupported) |
static void |
testEquals(Object o1,
Object o2,
Object o3,
Object... unequalObjects)
Tests the equals method of an object for reflexivity, symmetry, transitivity and non-nullity and tests if unequal objects are not equal.
|
static void |
testHashCode(Object o1,
Object o2)
Tests if equal objects have equal hashCode.
|
public static void testHashCode(Object o1, Object o2)
o1
- object 1o2
- object 2public static void testEquals(Object o1, Object o2, Object o3, Object... unequalObjects)
o1
- object 1o2
- object 2o3
- object 3unequalObjects
- unequal objectspublic static <T> void testComparatorConsistentWithEquals(Comparator<? super T> comparator, T o, T smaller, T equal, T greater, boolean nullValueSupported)
public static <T> void testComparator(Comparator<? super T> comparator, T o, T smaller, T equal, T greater, boolean nullValueSupported)
public static <T extends Comparable<? super T>> void testComparableConsistentWithEquals(T o, T smaller, T equal, T greater)
public static <T extends Comparable<? super T>> void testComparable(T o, T smaller, T equal, T greater)
Copyright © 2002–2017 SoftSmithy. All rights reserved.