textbender.g.lang
Class ObjectX

java.lang.Object
  extended by ObjectX

public final class ObjectX
extends Object

Object utilities.


Method Summary
static boolean nullEquals(Object o1, Object o2)
          Returns true iff the objects are either 'equal', or both null.
static boolean tryWait(Object object)
          Same as object.wait(), but returns normally if interrupted.
static boolean tryWait(Object object, long timeout)
          Same as object.wait(milliseconds), but returns normally if interrupted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

nullEquals

public static boolean nullEquals(Object o1,
                                 Object o2)
Returns true iff the objects are either 'equal', or both null.


tryWait

public static boolean tryWait(Object object)
Same as object.wait(), but returns normally if interrupted.

Returns:
true if the wait ended normally; false if an InterruptedException occured

tryWait

public static boolean tryWait(Object object,
                              long timeout)
Same as object.wait(milliseconds), but returns normally if interrupted.

Returns:
true if the wait ended normally; false if an InterruptedException occured