Registering new XOR command
This commit is contained in:
parent
ebec459cfd
commit
df450b20f7
@ -34,9 +34,12 @@ public class Xor implements Function {
|
|||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
writer.object();
|
writer.object();
|
||||||
writer.key("description"); writer.value("XORs two boolean values");
|
writer.key("description");
|
||||||
writer.key("params"); writer.value("boolean a, boolean b");
|
writer.value("XORs two boolean values");
|
||||||
writer.key("returns"); writer.value("boolean");
|
writer.key("params");
|
||||||
|
writer.value("boolean a, boolean b");
|
||||||
|
writer.key("returns");
|
||||||
|
writer.value("boolean");
|
||||||
writer.endObject();
|
writer.endObject();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,7 @@ import com.google.refine.expr.functions.arrays.Uniques;
|
|||||||
import com.google.refine.expr.functions.booleans.And;
|
import com.google.refine.expr.functions.booleans.And;
|
||||||
import com.google.refine.expr.functions.booleans.Not;
|
import com.google.refine.expr.functions.booleans.Not;
|
||||||
import com.google.refine.expr.functions.booleans.Or;
|
import com.google.refine.expr.functions.booleans.Or;
|
||||||
|
import com.google.refine.expr.functions.booleans.Xor;
|
||||||
import com.google.refine.expr.functions.date.DatePart;
|
import com.google.refine.expr.functions.date.DatePart;
|
||||||
import com.google.refine.expr.functions.date.Inc;
|
import com.google.refine.expr.functions.date.Inc;
|
||||||
import com.google.refine.expr.functions.date.Now;
|
import com.google.refine.expr.functions.date.Now;
|
||||||
@ -284,6 +285,7 @@ public class ControlFunctionRegistry {
|
|||||||
registerFunction("and", new And());
|
registerFunction("and", new And());
|
||||||
registerFunction("or", new Or());
|
registerFunction("or", new Or());
|
||||||
registerFunction("not", new Not());
|
registerFunction("not", new Not());
|
||||||
|
registerFunction("xor", new Xor());
|
||||||
|
|
||||||
registerFunction("cross", new Cross());
|
registerFunction("cross", new Cross());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user