Objects (JGoodies Common 1.4 API)
Date: 2012-07-24

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.jgoodies.common.base
Class Objects

    java.lang.Object
      com.jgoodies.common.base.Objects

    public final class Objects

extends Object

Provides static methods that operate on objects.

Version:
  $Revision: 1.1 $
Author:
  Karsten Lentzsch

Method Summary
`static
`<T extends Serializable> T`
` | `deepCopy(T original)` Provides a means to copy objects that do not implement Cloneable.
`static boolean` | `equals(Object o1, Object o2)` Checks and answers if the two objects are both `null` or equal.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### deepCopy

    public static <T extends Serializable> T deepCopy(T original)

  Provides a means to copy objects that do not implement Cloneable. Performs a deep copy where the copied object has no references to the original object for any object that implements Serializable. If the original is `null`, this method just returns `null`.

  Type Parameters:
    `T` - the type of the object to be cloned
  Parameters:
    `original` - the object to copied, may be `null`
  Returns:
    the copied object
  Since:
    1.1.1

### equals

    public static boolean equals(Object o1,
                                 Object o2)

  Checks and answers if the two objects are both `null` or equal.

       Objects.equals(null, null) == true
       Objects.equals("Hi", "Hi") == true
       Objects.equals("Hi", null) == false
       Objects.equals(null, "Hi") == false
       Objects.equals("Hi", "Ho") == false

  Parameters:
    `o1` - the first object to compare
    `o2` - the second object to compare
  Returns:
    boolean `true` if and only if both objects are `null` or equal according to `equals` invoked on the first object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.