Package org.apache.http.util
Class LangUtils
java.lang.Object
org.apache.http.util.LangUtils
- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
HASH_SEED
public static final int HASH_SEED- See Also:
-
HASH_OFFSET
public static final int HASH_OFFSET- See Also:
-
-
Constructor Details
-
LangUtils
private LangUtils()Disabled default constructor.
-
-
Method Details
-
hashCode
public static int hashCode(int seed, int hashcode) -
hashCode
public static int hashCode(int seed, boolean b) -
hashCode
-
equals
Check if two objects are equal.- Parameters:
obj1
- first object to compare, may benull
obj2
- second object to compare, may benull
- Returns:
true
if the objects are equal or both null
-
equals
Check if two object arrays are equal.- If both parameters are null, return
true
- If one parameter is null, return
false
- If the array lengths are different, return
false
- Compare array elements using .equals(); return
false
if any comparisons fail. - Return
true
- Parameters:
a1
- first array to compare, may benull
a2
- second array to compare, may benull
- Returns:
true
if the arrays are equal or both null
- If both parameters are null, return
-