org.apache.pig.impl.util
Class Utils

java.lang.Object
  extended by org.apache.pig.impl.util.Utils

public class Utils
extends Object

Class with utility static methods


Constructor Summary
Utils()
           
 
Method Summary
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
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.
static Schema getSchemaFromString(String schemaString)
           
static Schema getSchemaFromString(String schemaString, byte defaultType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

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 compared
obj2 - second object to be compared
checkEquality - 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 compare
obj2 - 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

getSchemaFromString

public static Schema getSchemaFromString(String schemaString)
                                  throws org.apache.pig.impl.logicalLayer.parser.ParseException
Throws:
org.apache.pig.impl.logicalLayer.parser.ParseException

getSchemaFromString

public static Schema getSchemaFromString(String schemaString,
                                         byte defaultType)
                                  throws org.apache.pig.impl.logicalLayer.parser.ParseException
Throws:
org.apache.pig.impl.logicalLayer.parser.ParseException


Copyright © ${year} The Apache Software Foundation