org.apache.pig.impl.util
Class Utils
java.lang.Object
org.apache.pig.impl.util.Utils
public class Utils
- extends Object
Class with utility static methods
Constructor Summary |
Utils()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
checkNullEquals
public static boolean checkNullEquals(Object obj1,
Object obj2,
boolean checkEquality)
- This method is a helper for classes to implement
Object.equals(java.lang.Object)
checks if two objects are equals - two levels of checks are
made - first if both are null or not null. If either is null,
check is made whether both are null.
If both are non null, equality also is checked if so indicated
- Parameters:
obj1
- first object to be comparedobj2
- second object to be comparedcheckEquality
- flag to indicate whether object equality should
be checked if obj1 and obj2 are non-null
- Returns:
- true if the two objects are equal
false otherwise
checkNullAndClass
public static boolean checkNullAndClass(Object obj1,
Object obj2)
- This method is a helper for classes to implement
Object.equals(java.lang.Object)
The method checks whether the two arguments are both null or both not null and
whether they are of the same class
- Parameters:
obj1
- first object to compareobj2
- second object to compare
- Returns:
- true if both objects are null or both are not null
and if both are of the same class if not null
false otherwise
Copyright © ${year} The Apache Software Foundation