diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-03 19:06:12 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-03 19:06:12 +0200 |
commit | 88292e9304afd644db9f54a526ecbe9bae314dd6 (patch) | |
tree | 304dc323fee29578f547993b44645e2c2b56e555 /src | |
parent | f8f75fde6d6392aee2504df5bde05459d0b0c36f (diff) | |
download | JRummikub-88292e9304afd644db9f54a526ecbe9bae314dd6.tar JRummikub-88292e9304afd644db9f54a526ecbe9bae314dd6.zip |
tested and implemented clone() in StoneTray
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@84 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src')
-rw-r--r-- | src/jrummikub/model/StoneTray.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/jrummikub/model/StoneTray.java b/src/jrummikub/model/StoneTray.java index 7f97e1b..f215164 100644 --- a/src/jrummikub/model/StoneTray.java +++ b/src/jrummikub/model/StoneTray.java @@ -209,11 +209,16 @@ public class StoneTray<E extends Sizeable> implements }; } - /** - * @param object - */ public void pickUp(E object) { objects.remove(object); } + + + @Override + public StoneTray<E> clone() { + StoneTray<E> copy = new StoneTray(); + copy.objects = (HashMap<E, Position>) objects.clone(); + return copy; + } } |