DRCL JavaSim API

drcl.util
Class ObjectUtil

java.lang.Object
  |
  +--drcl.util.ObjectUtil

public class ObjectUtil
extends java.lang.Object


Constructor Summary
ObjectUtil()
           
 
Method Summary
static java.lang.Object clone(java.lang.Object o_)
          Returns the clone of o_.
static java.lang.Object clone(java.lang.Object o_, boolean raiseException_)
          Returns the clone of o_.
static boolean equals(java.lang.Object o1_, java.lang.Object o2_)
          Returns true if o1_ is equal to o2_.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectUtil

public ObjectUtil()
Method Detail

clone

public static java.lang.Object clone(java.lang.Object o_)
Returns the clone of o_. It calls o_.clone(), if possible, and returns null if fails.

clone

public static java.lang.Object clone(java.lang.Object o_,
                                     boolean raiseException_)
Returns the clone of o_. It calls o_.clone(), if possible, and either raises an exception or returns null if fails.
Parameters:
raiseException_ - set to true if one wishes to get exception instead of receiving null when this method fails to call o_.clone().

equals

public static boolean equals(java.lang.Object o1_,
                             java.lang.Object o2_)
Returns true if o1_ is equal to o2_. It is mainly for comparing arrays of objects. The equals() of a Java array does not compare the content of array. This method checks the content (recursively) in the array and returns true if all the content are equal under this method. If the arguments are not array, then the method simply returns o1_.equals(o2_).

DRCL JavaSim API

Copyright © 2001 - DRCL, OSU     ~ Back to JavaSim Home ~