14
15
this.right = right;
18
public GuardExpression getLeftExpression() {
21
public GuardExpression getRightExpression() {
26
public boolean isSimpleProperty() {return false; }
29
public ExprStringPosition[] getChildren() {
30
ExprStringPosition[] children = new ExprStringPosition[2];
34
boolean wasPrevSimple = false;
38
end = start + left.toString().length();
40
ExprStringPosition pos = new ExprStringPosition(start, end, left);
44
end = start + right.toString().length();
45
pos = new ExprStringPosition(start, end, right);
51
public boolean equals(Object o) {
52
if (o instanceof OrExpression) {
53
OrExpression expr = (OrExpression)o;
54
return left.equals(expr.left) && right.equals(expr.right);
61
public GuardExpression copy() {
62
return new AndExpression(left, right);
18
66
public GuardExpression replace(Expression object1, Expression object2) {
23
public GuardExpression copy() {
67
if (this == object1 && object2 instanceof GuardExpression) {
68
GuardExpression ge = (GuardExpression)object2;
73
left = left.replace(object1, object2);
74
right = right.replace(object1, object2);
28
80
public boolean containsPlaceHolder() {
81
return left.containsPlaceHolder() || right.containsPlaceHolder();
33
85
public GuardExpression findFirstPlaceHolder() {
86
GuardExpression ph = null;
87
if (left.containsPlaceHolder()) {
88
return left.findFirstPlaceHolder();
91
return right.findFirstPlaceHolder();
37
95
public void getVariables(Set<Variable> variables) {