org.jopendocument.util
Class CopyUtils

java.lang.Object
  extended by org.jopendocument.util.CopyUtils

public final class CopyUtils
extends Object


Constructor Summary
CopyUtils()
           
 
Method Summary
static
<E> E
copy(E object)
          Copy the passed object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyUtils

public CopyUtils()
Method Detail

copy

public static final <E> E copy(E object)
Copy the passed object. First tries to clone() it, otherwise tries with a copy constructor.

Type Parameters:
E - the type of object to be copied.
Parameters:
object - the object to be copied, can be null.
Returns:
a copy of object, or null if object was null.
Throws:
IllegalStateException - if the object can't be copied.


Copyright © 2010 jOpenDocument All Rights Reserved.