public class ArrayUtil extends Object
Constructor and Description |
---|
ArrayUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(Object thisObj,
Object thatObj)
Compares two objects.
|
static int |
hashCode(Object obj)
Returns a hash code for
obj . |
static String |
toString(Object obj)
If the
obj is an array, toString() method of Arrays is called. |
public static int hashCode(Object obj)
obj
.obj
- The object to get a hash code for. May be an array or null
.obj
or 0 if obj
is null
public static boolean equals(Object thisObj, Object thatObj)
true
if
thisObj
and thatObj
are both null
thisObj
and thatObj
are instances of the same type and
Object.equals(Object)
returns true
thisObj
and thatObj
are arrays with the same component type and
equals() method of Arrays
returns true
(not deepEquals())thisObj
- The left hand object to compare. May be an array or null
thatObj
- The right hand object to compare. May be an array or null
true
if two objects are equal; false
otherwise.public static String toString(Object obj)
obj
is an array, toString() method of Arrays
is called. Otherwise
Object.toString()
is called. Returns "null" if obj
is null
.obj
- An object. May be an array or null
.obj
.Copyright © 2009–2021 MyBatis.org. All rights reserved.