Example #1
0
 /**
  * Returns the operand's value divided by 100.
  *
  * @return the operand's value divided by 100
  * @throws IllegalValueTypeException if the value of the operand is not numeric
  */
 public Value applyTo(Expression operand) throws IllegalValueTypeException {
   return new Value(operand.evaluate().toDouble() / 100d);
 }
Example #2
0
 /**
  * Traverses the given expression and returns the references that were found.
  *
  * @param expression the expression from which to fetch references
  * @return the references that have been fetched
  */
 public SortedSet<Reference> getReferences(Expression expression) {
   references = new TreeSet<Reference>();
   expression.accept(this);
   return references;
 }