package urban.model;
import java.util.List;
import urban.shapes.Shape;
import urban.shapes.ShapeParameters;
/**
* Line of the form "%shape: 'id' A(x!1),B(x!1) := 0.4"
*/
public class ShapeStatement extends AbstractStatement implements ShapeParameterStatement {
private final Shape s;
private final Double e;
private final String id;
/**
* @param id an id for the shape that can be used in other statements
* @param expression an agent list that represents a shape
* @param e an energy value
*/
public ShapeStatement(String id, List<Agent> expression, Double e) {
this.id = id;
this.s = new Shape(expression);
this.e = e;
}
@Override
public void addParametersTo(ShapeParameters tmp) {
tmp.shapes.put(id, s);
tmp.epsilons.put(s, e);
}
@Override
public String toString() {
return "";
}
}