public final class Objects
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static int |
hashCode(boolean bool)
Return the same value as
. |
static int |
hashCode(double dbl)
Return the same value as
. |
static int |
hashCode(float flt)
Return the same value as
. |
static int |
hashCode(long lng)
Return the same value as
. |
static int |
nullSafeHashCode(boolean[] array)
Return a hash code based on the contents of the specified array.
|
static int |
nullSafeHashCode(byte[] array)
Return a hash code based on the contents of the specified array.
|
static int |
nullSafeHashCode(char[] array)
Return a hash code based on the contents of the specified array.
|
static int |
nullSafeHashCode(double[] array)
Return a hash code based on the contents of the specified array.
|
static int |
nullSafeHashCode(float[] array)
Return a hash code based on the contents of the specified array.
|
static int |
nullSafeHashCode(int[] array)
Return a hash code based on the contents of the specified array.
|
static int |
nullSafeHashCode(long[] array)
Return a hash code based on the contents of the specified array.
|
static int |
nullSafeHashCode(java.lang.Object obj)
Return as hash code for the given object; typically the value of
. |
static int |
nullSafeHashCode(java.lang.Object[] array)
Return a hash code based on the contents of the specified array.
|
static int |
nullSafeHashCode(short[] array)
Return a hash code based on the contents of the specified array.
|
static java.lang.String |
nullSafeToString(boolean[] array)
Return a String representation of the contents of the specified array.
|
static java.lang.String |
nullSafeToString(byte[] array)
Return a String representation of the contents of the specified array.
|
static java.lang.String |
nullSafeToString(char[] array)
Return a String representation of the contents of the specified array.
|
static java.lang.String |
nullSafeToString(double[] array)
Return a String representation of the contents of the specified array.
|
static java.lang.String |
nullSafeToString(float[] array)
Return a String representation of the contents of the specified array.
|
static java.lang.String |
nullSafeToString(int[] array)
Return a String representation of the contents of the specified array.
|
static java.lang.String |
nullSafeToString(long[] array)
Return a String representation of the contents of the specified array.
|
static java.lang.String |
nullSafeToString(java.lang.Object obj)
Return a String representation of the specified Object.
|
static java.lang.String |
nullSafeToString(java.lang.Object[] array)
Return a String representation of the contents of the specified array.
|
static java.lang.String |
nullSafeToString(short[] array)
Return a String representation of the contents of the specified array.
|
public static int nullSafeHashCode(java.lang.Object obj)
Object.hashCode(). If the object is an array,
this method will delegate to any of the nullSafeHashCode
methods for arrays in this class. If the object is null,
this method returns 0.public static int nullSafeHashCode(java.lang.Object[] array)
array is null, this method returns 0.public static int nullSafeHashCode(boolean[] array)
array is null, this method returns 0.public static int nullSafeHashCode(byte[] array)
array is null, this method returns 0.public static int nullSafeHashCode(char[] array)
array is null, this method returns 0.public static int nullSafeHashCode(double[] array)
array is null, this method returns 0.public static int nullSafeHashCode(float[] array)
array is null, this method returns 0.public static int nullSafeHashCode(int[] array)
array is null, this method returns 0.public static int nullSafeHashCode(long[] array)
array is null, this method returns 0.public static int nullSafeHashCode(short[] array)
array is null, this method returns 0.public static int hashCode(boolean bool)
Boolean.hashCode().Boolean.hashCode()public static int hashCode(double dbl)
Double.hashCode().Double.hashCode()public static int hashCode(float flt)
Float.hashCode().Float.hashCode()public static int hashCode(long lng)
Long.hashCode().Long.hashCode()public static java.lang.String nullSafeToString(java.lang.Object obj)
Builds a String representation of the contents in case of an array.
Returns "null" if obj is null.
obj - the object to build a String representation forobjpublic static java.lang.String nullSafeToString(java.lang.Object[] array)
The String representation consists of a list of the array's elements,
enclosed in curly braces ("{}"). Adjacent elements are separated
by the characters ", " (a comma followed by a space). Returns
"null" if array is null.
array - the array to build a String representation forarraypublic static java.lang.String nullSafeToString(boolean[] array)
The String representation consists of a list of the array's elements,
enclosed in curly braces ("{}"). Adjacent elements are separated
by the characters ", " (a comma followed by a space). Returns
"null" if array is null.
array - the array to build a String representation forarraypublic static java.lang.String nullSafeToString(byte[] array)
The String representation consists of a list of the array's elements,
enclosed in curly braces ("{}"). Adjacent elements are separated
by the characters ", " (a comma followed by a space). Returns
"null" if array is null.
array - the array to build a String representation forarraypublic static java.lang.String nullSafeToString(char[] array)
The String representation consists of a list of the array's elements,
enclosed in curly braces ("{}"). Adjacent elements are separated
by the characters ", " (a comma followed by a space). Returns
"null" if array is null.
array - the array to build a String representation forarraypublic static java.lang.String nullSafeToString(double[] array)
The String representation consists of a list of the array's elements,
enclosed in curly braces ("{}"). Adjacent elements are separated
by the characters ", " (a comma followed by a space). Returns
"null" if array is null.
array - the array to build a String representation forarraypublic static java.lang.String nullSafeToString(float[] array)
The String representation consists of a list of the array's elements,
enclosed in curly braces ("{}"). Adjacent elements are separated
by the characters ", " (a comma followed by a space). Returns
"null" if array is null.
array - the array to build a String representation forarraypublic static java.lang.String nullSafeToString(int[] array)
The String representation consists of a list of the array's elements,
enclosed in curly braces ("{}"). Adjacent elements are separated
by the characters ", " (a comma followed by a space). Returns
"null" if array is null.
array - the array to build a String representation forarraypublic static java.lang.String nullSafeToString(long[] array)
The String representation consists of a list of the array's elements,
enclosed in curly braces ("{}"). Adjacent elements are separated
by the characters ", " (a comma followed by a space). Returns
"null" if array is null.
array - the array to build a String representation forarraypublic static java.lang.String nullSafeToString(short[] array)
The String representation consists of a list of the array's elements,
enclosed in curly braces ("{}"). Adjacent elements are separated
by the characters ", " (a comma followed by a space). Returns
"null" if array is null.
array - the array to build a String representation forarrayCopyright © 2019-2020 paseto.dev. All Rights Reserved.