Exemple #1
0
 @Override
 protected void doEvaluate(
     TExecutionContext context, LazyList<? extends ValueSource> inputs, ValueTarget output) {
   double value = inputs.get(0).getDouble();
   if (value < 0) {
     output.putNull();
   } else {
     output.putDouble(Math.sqrt(value));
   }
 }
 @Override
 public void fromObject(TExecutionContext context, ValueSource in, ValueTarget out) {
   if (in.isNull()) out.putNull();
   else if (!tryFromObject(context, in, out)) parser.parse(context, in, out);
 }