|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.plt.object.ObjectUtil
public final class ObjectUtil
Utility methods that may be useful in implementing an object of any type.
| Method Summary | ||
|---|---|---|
static
|
compare(Comparator<? super T1> comp1,
T1 x1,
T1 y1,
Comparator<? super T2> comp2,
T2 x2,
T2 y2)
|
|
static
|
compare(Comparator<? super T1> comp1,
T1 x1,
T1 y1,
Comparator<? super T2> comp2,
T2 x2,
T2 y2,
Comparator<? super T3> comp3,
T3 x3,
T3 y3)
|
|
static
|
compare(Comparator<? super T1> comp1,
T1 x1,
T1 y1,
Comparator<? super T2> comp2,
T2 x2,
T2 y2,
Comparator<? super T3> comp3,
T3 x3,
T3 y3,
Comparator<? super T4> comp4,
T4 x4,
T4 y4)
|
|
static
|
compare(T1 x1,
T1 y1,
T2 x2,
T2 y2)
|
|
static
|
compare(T1 x1,
T1 y1,
T2 x2,
T2 y2,
T3 x3,
T3 y3)
|
|
static
|
compare(T1 x1,
T1 y1,
T2 x2,
T2 y2,
T3 x3,
T3 y3,
T4 x4,
T4 y4)
|
|
static int |
compositeHeight(Iterable<?> objs)
Get the maximum composite height of a set of objects. |
|
static int |
compositeHeight(Object... objs)
Get the maximum composite height of a set of objects. |
|
static int |
compositeHeight(Object obj)
Get the height of the object when treated as a composite. |
|
static int |
compositeSize(Iterable<?> objs)
Get the total composite size of a set of objects. |
|
static int |
compositeSize(Object... objs)
Get the total composite size of a set of objects. |
|
static int |
compositeSize(Object obj)
Get the composite size of the object. |
|
static boolean |
equal(Object o1,
Object o2)
|
|
static int |
hash()
Optimized implementation of hash(int[]) with 0 args. |
|
static int |
hash(int... keys)
Produce a hash value based on the given keys according to an algorithm attributed to Knuth (The Art of Programming, Vol. |
|
static int |
hash(int a)
Optimized implementation of hash(int[]) with 1 arg. |
|
static int |
hash(int a,
int b)
Optimized implementation of hash(int[])) with 2 args. |
|
static int |
hash(int a,
int b,
int c)
Optimized implementation of hash(int[]) with 3 args. |
|
static int |
hash(int a,
int b,
int c,
int d)
Optimized implementation of hash(int[]) with 4 args. |
|
static int |
hash(Iterable<?> iter)
Produce a hash code for an object in which equals() depends on the given values. |
|
static int |
hash(Object... objs)
Produce a hash code for an object in which #equals() depends on the given values. |
|
static int |
hash(Object a)
Optimized implementation of hash(Object[]) with 1 arg. |
|
static int |
hash(Object a,
Object b)
Optimized implementation of hash(Object[])) with 2 args. |
|
static int |
hash(Object a,
Object b,
Object c)
Optimized implementation of hash(Object[]) with 3 args. |
|
static int |
hash(Object a,
Object b,
Object c,
Object d)
Optimized implementation of hash(Object[]) with 4 args. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean equal(Object o1,
Object o2)
public static int hash()
hash(int[]) with 0 args.
public static int hash(int a)
hash(int[]) with 1 arg.
public static int hash(int a,
int b)
hash(int[])) with 2 args.
public static int hash(int a,
int b,
int c)
hash(int[]) with 3 args.
public static int hash(int a,
int b,
int c,
int d)
hash(int[]) with 4 args.
public static int hash(int... keys)
public static int hash(Object a)
hash(Object[]) with 1 arg.
public static int hash(Object a,
Object b)
hash(Object[])) with 2 args.
public static int hash(Object a,
Object b,
Object c)
hash(Object[]) with 3 args.
public static int hash(Object a,
Object b,
Object c,
Object d)
hash(Object[]) with 4 args.
public static int hash(Object... objs)
#equals() depends on the given values.
public static int hash(Iterable<?> iter)
equals() depends on the given values.
public static <T1 extends Comparable<? super T1>,T2 extends Comparable<? super T2>> int compare(T1 x1,
T1 y1,
T2 x2,
T2 y2)
public static <T1,T2> int compare(Comparator<? super T1> comp1,
T1 x1,
T1 y1,
Comparator<? super T2> comp2,
T2 x2,
T2 y2)
public static <T1 extends Comparable<? super T1>,T2 extends Comparable<? super T2>,T3 extends Comparable<? super T3>> int compare(T1 x1,
T1 y1,
T2 x2,
T2 y2,
T3 x3,
T3 y3)
public static <T1,T2,T3> int compare(Comparator<? super T1> comp1,
T1 x1,
T1 y1,
Comparator<? super T2> comp2,
T2 x2,
T2 y2,
Comparator<? super T3> comp3,
T3 x3,
T3 y3)
public static <T1 extends Comparable<? super T1>,T2 extends Comparable<? super T2>,T3 extends Comparable<? super T3>,T4 extends Comparable<? super T4>> int compare(T1 x1,
T1 y1,
T2 x2,
T2 y2,
T3 x3,
T3 y3,
T4 x4,
T4 y4)
public static <T1,T2,T3,T4> int compare(Comparator<? super T1> comp1,
T1 x1,
T1 y1,
Comparator<? super T2> comp2,
T2 x2,
T2 y2,
Comparator<? super T3> comp3,
T3 x3,
T3 y3,
Comparator<? super T4> comp4,
T4 x4,
T4 y4)
public static int compositeHeight(Object obj)
obj implements
Composite, invokes Composite.compositeHeight(); otherwise, returns 0.
public static int compositeHeight(Object... objs)
public static int compositeHeight(Iterable<?> objs)
public static int compositeSize(Object obj)
obj implements Composite,
invokes Composite.compositeSize(); otherwise, returns 1.
public static int compositeSize(Object... objs)
public static int compositeSize(Iterable<?> objs)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||