Ejemplo n.º 1
0
 @Override
 public void eval(QueryExpression expr, Callback<Target> callback)
     throws QueryException, InterruptedException {
   BatchStreamedCallback aggregator =
       new BatchStreamedCallback(callback, BATCH_CALLBACK_SIZE, createUniquifier());
   expr.eval(this, aggregator);
   aggregator.processLastPending();
 }
Ejemplo n.º 2
0
 @Override
 public String toString() {
   switch (type) {
     case WORD:
       return "'" + word + "'";
     case EXPRESSION:
       return expression.toString();
     case INTEGER:
       return Integer.toString(integer);
     default:
       throw new IllegalStateException();
   }
 }