org.kuali.kfs.gl
Class ObjectHelper

java.lang.Object
  extended by org.kuali.kfs.gl.ObjectHelper
Direct Known Subclasses:
StringHelper

public class ObjectHelper
extends Object

This class is used to compare objects with one another


Constructor Summary
protected ObjectHelper()
           
 
Method Summary
static boolean isEqual(Object lhs, Object rhs)
          Returns true if object on left side is equal to object on right side
static boolean isOneOf(Object lhs, Object[] rhs)
          Return true if object on left side is one of the items in array of objects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectHelper

protected ObjectHelper()
Method Detail

isEqual

public static boolean isEqual(Object lhs,
                              Object rhs)
Returns true if object on left side is equal to object on right side

Parameters:
lhs - object on left side of equation
rhs - object on right side of equation
Returns:
true if both lhs and rhs are null or if lhs.equals(rhs)

isOneOf

public static boolean isOneOf(Object lhs,
                              Object[] rhs)
Return true if object on left side is one of the items in array of objects

Parameters:
lhs - object on left side of equation
rhs - object on right side of equation
Returns:
false if rhs is null. true if isEqual(lhs, rhs[i]) for any ith element of rhs.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.