From 1b94ee53050a07df697d7b2ffd4bffa68c77519b Mon Sep 17 00:00:00 2001 From: zeroflag Date: Fri, 13 Aug 2021 12:37:16 +0200 Subject: [PATCH] undo redo proto --- src/main/java/com/vectron/fcl/FclStack.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/com/vectron/fcl/FclStack.java b/src/main/java/com/vectron/fcl/FclStack.java index f2c4737..7103300 100644 --- a/src/main/java/com/vectron/fcl/FclStack.java +++ b/src/main/java/com/vectron/fcl/FclStack.java @@ -102,4 +102,15 @@ public class FclStack { private String fileName(String id) { return String.format("stack%s.json", id); } + + public void populate(FclStack other) { + stack.clear(); + stack.addAll(other.stack); + } + + public FclStack copy() { + FclStack copy = new FclStack(); + copy.populate(this); + return copy; + } }