From 9b564a460ee0005f25c998b789bcd504d350fdf6 Mon Sep 17 00:00:00 2001 From: sk89q Date: Tue, 1 Apr 2014 16:23:13 -0700 Subject: [PATCH] Added Javadocs to ChangeSetExecutor. --- .../function/operation/ChangeSetExecutor.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/main/java/com/sk89q/worldedit/function/operation/ChangeSetExecutor.java b/src/main/java/com/sk89q/worldedit/function/operation/ChangeSetExecutor.java index bc993810c..a023fd1b7 100644 --- a/src/main/java/com/sk89q/worldedit/function/operation/ChangeSetExecutor.java +++ b/src/main/java/com/sk89q/worldedit/function/operation/ChangeSetExecutor.java @@ -28,6 +28,9 @@ import java.util.Iterator; import static com.google.common.base.Preconditions.checkNotNull; +/** + * Performs an undo or redo from a given {@link ChangeSet}. + */ public class ChangeSetExecutor implements Operation { public enum Type {UNDO, REDO} @@ -36,6 +39,13 @@ public class ChangeSetExecutor implements Operation { private final Type type; private final UndoContext context; + /** + * Create a new instance. + * + * @param changeSet the change set + * @param type type of change + * @param context the undo context + */ private ChangeSetExecutor(ChangeSet changeSet, Type type, UndoContext context) { checkNotNull(changeSet); checkNotNull(type); @@ -69,10 +79,24 @@ public class ChangeSetExecutor implements Operation { public void cancel() { } + /** + * Create a new undo operation. + * + * @param changeSet the change set + * @param context an undo context + * @return an operation + */ public static ChangeSetExecutor createUndo(ChangeSet changeSet, UndoContext context) { return new ChangeSetExecutor(changeSet, Type.UNDO, context); } + /** + * Create a new redo operation. + * + * @param changeSet the change set + * @param context an undo context + * @return an operation + */ public static ChangeSetExecutor createRedo(ChangeSet changeSet, UndoContext context) { return new ChangeSetExecutor(changeSet, Type.REDO, context); }