com.vaadin.sass.internal.util
Class DeepCopy
java.lang.Object
com.vaadin.sass.internal.util.DeepCopy
public class DeepCopy
- extends Object
Utility for making deep copies (vs. clone()'s shallow copies) of objects.
Objects are first serialized and then deserialized. Error checking is fairly
minimal in this implementation. If an object is encountered that cannot be
serialized (or that references an object that cannot be serialized) an error
is printed to the logger and null is returned. Depending on your specific
application, it might make more sense to have copy(...) re-throw the
exception.
|
Method Summary |
static
|
copy(Collection<T> objects)
|
static Object |
copy(Object orig)
Returns a copy of the object, or null if the object cannot be serialized. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeepCopy
public DeepCopy()
copy
public static Object copy(Object orig)
- Returns a copy of the object, or null if the object cannot be serialized.
copy
public static <T extends Node> Collection<T> copy(Collection<T> objects)
Copyright © 2013–2014 Vaadin. All rights reserved.