com.partnersoft.data
Class ObjectLib

java.lang.Object
  extended by com.partnersoft.data.ObjectLib
All Implemented Interfaces:
Lib

public class ObjectLib
extends java.lang.Object
implements Lib

Functions for dealing with objects. Some handy functions for messing with data.

Author:
Paul Reavis Copyright 2003-2006 Partner Software, Inc.

Method Summary
static boolean areEqual(java.lang.Object a, java.lang.Object b)
          Something that it seems like the language should handle...
static java.lang.Object instantiate(java.lang.Class classy)
          Tries to create an instance of the given class; throws an IllegalArgumentException if it can't.
static java.lang.Object instantiate(java.lang.String classname)
          Tries to create an instance of the named class; throws an IllegalArgumentException if it can't.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instantiate

public static java.lang.Object instantiate(java.lang.Class classy)
Tries to create an instance of the given class; throws an IllegalArgumentException if it can't. Convenient.


instantiate

public static java.lang.Object instantiate(java.lang.String classname)
Tries to create an instance of the named class; throws an IllegalArgumentException if it can't. Convenient.


areEqual

public static boolean areEqual(java.lang.Object a,
                               java.lang.Object b)
Something that it seems like the language should handle... equality testing using identity test, then .equals(), dealing with nulls properly.

Parameters:
a - first object to compare
b - second object to compare
Returns:
true if a and b are both null or if a.equals(b)