use of catdata.fpql.XExp.XBool in project fql by CategoricalData.
the class XParser method toWhere.
private static XBool toWhere(Object o) {
if (o instanceof Tuple5) {
Tuple5 o2 = (Tuple5) o;
boolean isAnd = o2.c.toString().equals("and");
return new XBool(toWhere(o2.b), toWhere(o2.d), isAnd);
}
if (o instanceof Tuple3) {
Tuple3 o2 = (Tuple3) o;
return new XBool((List<Object>) o2.a, (List<Object>) o2.c);
}
if (o instanceof org.jparsec.functors.Pair) {
org.jparsec.functors.Pair x = (org.jparsec.functors.Pair) o;
return new XBool(toWhere(x.b));
}
if (o.toString().equals("true")) {
return new XBool(true);
}
if (o.toString().equals("false")) {
return new XBool(false);
}
throw new RuntimeException();
}