+ public static class RemoveKey extends Key {
+ public RemoveKey(String c) { super(c); }
+ public RemoveKey(String p, String m) { super(p, m); }
+ public Response process(JSScope root) throws JSExn {
+ JS js = keyed(path(root));
+ if (js == null) throw new JSExn("no such path");
+ boolean rm = js.containsKey(matcher);
+ if (rm) js.remove(matcher);
+ return new Res(rm);
+ }
+
+ public static class Res extends Response {
+ private boolean removed;
+ public Res() { }
+ public Res(boolean rm) { removed = rm; }
+ public boolean removed() { return removed; }
+ }
+ }
+
+ /** Runs a series of requests. */