skrueger.geotools
Class CopyableUtil
java.lang.Object
skrueger.geotools.CopyableUtil
public class CopyableUtil
- extends Object
Some utility method for Copyable
.
- Author:
- Martin Schmitz
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CopyableUtil
public CopyableUtil()
copyOrCreate
public static <T extends Copyable<T>> T copyOrCreate(T source,
T dest)
- Copies an
Copyable
to another. If possible no new destination
instance is created, so the "original" destination object is
also returned.
If source
is null
, the dest
object
is irrelevant and null
is returned. If dest
is NULL
and source
in not NULL, a new source.copy()
is
returned.
- Parameters:
source
- the source object (can be null
)dest
- the object, the source values are copied to (can be null
)