goldman
Class Objects
java.lang.Object
goldman.Objects
public abstract class Objects
- extends Object
The Objects abstract class holds a variety of utilities to support
many data structures.
Nested Class Summary |
static class |
Objects.DefaultEquivalenceTester<E>
If no comparator is provided in the constructor for a data
structure that depends on the elements being comparable,
the following default equivalence tester is used. |
Method Summary |
static boolean |
equivalent(Object o1,
Object o2)
Returns true if and only if
o1 and o2 are equivalent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY
public static final Object EMPTY
DELETED
public static final Object DELETED
DEFAULT_EQUIVALENCE_TESTER
public static final Comparator<Object> DEFAULT_EQUIVALENCE_TESTER
DEFAULT_COMPARATOR
public static final Comparator<Object> DEFAULT_COMPARATOR
Objects
public Objects()
equivalent
public static final boolean equivalent(Object o1,
Object o2)
- Returns true if and only if
o1
and o2
are equivalent. This method
assumes the equals
method is symmetric. If that were
not the case then o1.equals(o2)
would need to be
replaced by o1.equals(o2) && o2.equals(o1)
, which would
make this method less efficient.