Improve javadoc

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@928453 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joerg Schaible 2010-03-28 17:04:59 +00:00
parent 910d8a0d66
commit f9e141cfe5
1 changed files with 7 additions and 1 deletions

View File

@ -344,7 +344,13 @@ public static <T> T clone(final T o) {
}
/**
* Clone an object if possible.
* Clone an object if possible. This method is similar to {@link #clone(Object)}, but will
* return the provided instance as return value instead of <code>null</code> if the instance
* is not cloneable. This is convenient in case the caller will use different
* implementations (e.g. of a service) and some of the instances do not allow concurrent
* processing or have state. In such a case the implementation can simply provide a proper
* clone implementation and the caller has not to take care, it will simply call this method
* here.
*
* @param <T> the type of the object
* @param o the object to clone