use of com.cinchapi.ccl.grammar.Symbol in project concourse by cinchapi.
the class BuiltCriteria method ccl.
@Override
public String ccl() {
StringBuilder sb = new StringBuilder();
boolean first = true;
for (Symbol symbol : symbols) {
if (!first) {
sb.append(" ");
}
sb.append(symbol);
first = false;
}
return sb.toString();
}
use of com.cinchapi.ccl.grammar.Symbol in project concourse by cinchapi.
the class BuiltCriteria method expand.
/**
* Expand any sub/grouped Criteria.
*
* @param symbols
* @param expanded
*/
private void expand(List<Symbol> symbols, List<Symbol> expanded) {
for (Symbol symbol : symbols) {
if (symbol instanceof Criteria) {
expanded.add(ParenthesisSymbol.LEFT);
expand(((Criteria) symbol).symbols(), expanded);
expanded.add(ParenthesisSymbol.RIGHT);
} else {
expanded.add(symbol);
}
}
}
Aggregations