|
PageMixer API - 3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jp.ne.dti.lares.foozy.pagemixer.Utils
Utilities.
Constructor Summary | |
Utils()
|
Method Summary | |
static int |
calcHash(java.lang.Object object)
Utility to calculate hash code from object safely. |
static int |
calcHashes(java.lang.Object[] objects)
Utility to calculate hash code from object array. |
static boolean |
compare(java.lang.Object[] a1,
java.lang.Object[] a2)
Utility to compare contents of two object arrays. |
static boolean |
equals(java.lang.String s1,
java.lang.String s2)
Compare two strings. |
static java.lang.String |
toString(java.lang.Object object)
Get string representation safely. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Utils()
Method Detail |
public static boolean compare(java.lang.Object[] a1, java.lang.Object[] a2)
Order of elements does not effect
the result of this method.
So, this is usefull to compare
two Attribute
arrays of Token
,
because Token
s are recognized as same as each other
when they have same Attribute
s.
This assumes that there is no null
element in both arrays.
a1
- an array to be compared(may be null)a2
- another array to be compared(may be null)public static int calcHash(java.lang.Object object)
Please use calcHashes(java.lang.Object[])
to
calculate hash code of object array.
public static int calcHashes(java.lang.Object[] objects)
This returns XOR hashCode
of all elements in the array.
public static boolean equals(java.lang.String s1, java.lang.String s2)
This returns true not only when s1 has as same value as s2, but also when both s1 and s2 are null safely.
public static java.lang.String toString(java.lang.Object object)
This examines whether specified object is null or not,
and returns "<null>
" if so.
Otherwise, this returns result of toString
method invocation on that object.
|
PageMixer API - 3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |