コード例 #1
0
ファイル: Percent.java プロジェクト: askpt/LAPR4
 /**
  * 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);
 }
コード例 #2
0
ファイル: ReferenceFetcher.java プロジェクト: askpt/LAPR4
 /**
  * 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;
 }