public interface Equator<T>
defaultEquator() tricks
the type system into using generic type parameters (correctly) with an enum.| Modifier and Type | Interface and Description |
|---|---|
static class |
Equator.Comp |
static class |
Equator.Equat |
| Modifier and Type | Method and Description |
|---|---|
static <T> Comparator<T> |
defaultComparator() |
static <T> Equator<T> |
defaultEquator() |
static int |
doCompare(Comparable<Object> o1,
Comparable<Object> o2)
This is the guts of building a comparator from Comparables.
|
boolean |
eq(T o1,
T o2)
Determines whether two objects are equal.
|
int |
hash(T t)
An integer digest used for very quick "can-equal" testing.
|
default boolean |
neq(T o1,
T o2)
Returns true if two objects are NOT equal.
|
static <T> Equator<T> defaultEquator()
static <T> Comparator<T> defaultComparator()
static int doCompare(Comparable<Object> o1, Comparable<Object> o2)
int hash(T t)
boolean eq(T o1, T o2)
default boolean neq(T o1, T o2)
eq(Object, Object) and reverses
the result.Copyright © 2019. All rights reserved.