Java clone vs copy constructor
如果需要复制一个对象,提供类似下面这种方法似乎是个不错的选择
Foo copyFoo (Foo foo){ Foo f = new Foo(); //for all properties in FOo f.set(foo.get()); return f; }
Effective Java,第11条有关于clone的讨论
http://stackoverflow.com/questions/2427883/clone-vs-copy-constructor-which-is-recommended-in-java
http://www.xenoveritas.org/blog/xeno/java_copy_constructors_and_clone 作者表示两者都不好
http://adtmag.com/articles/2000/01/18/effective-javaeffective-cloning.aspx