Changed signature of the optimize() method to return an RValue.

This commit is contained in:
TomyLobo 2011-11-24 20:50:07 +01:00
parent 7cbb7da80b
commit 05b427316d
4 changed files with 4 additions and 4 deletions

View File

@ -84,7 +84,7 @@ public class Function extends Node {
}
@Override
public Node optimize() throws EvaluationException {
public RValue optimize() throws EvaluationException {
final RValue[] optimizedArgs = new RValue[args.length];
boolean optimizable = !method.isAnnotationPresent(Dynamic.class);
int position = getPosition();

View File

@ -34,7 +34,7 @@ public abstract class Node implements RValue {
@Override
public abstract String toString();
public Node optimize() throws EvaluationException {
public RValue optimize() throws EvaluationException {
return this;
}

View File

@ -29,5 +29,5 @@ import com.sk89q.worldedit.expression.Identifiable;
public interface RValue extends Identifiable {
public double getValue() throws EvaluationException;
public Node optimize() throws EvaluationException;
public RValue optimize() throws EvaluationException;
}

View File

@ -66,7 +66,7 @@ public class Sequence extends Node {
}
@Override
public Node optimize() throws EvaluationException {
public RValue optimize() throws EvaluationException {
List<RValue> newSequence = new ArrayList<RValue>();
RValue droppedLast = null;