summaryrefslogtreecommitdiffstats
path: root/Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java
blob: 943e7dea6bb117583e4e27c0dcca497b725864c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package swa.prakt3;

public class ArithmeticVariable extends ArithmeticExpression {
	private String name;
	private Number value;
	
	public ArithmeticVariable(String name,Number value) {
		this.name = name;
		this.value = value;
		this.type = ExprType.VAR;
	}
	
	public String getName() {
		return name;
	}
	public Number getValue() {
		return value;
	}
	@Override
	public Number accept(Visitor v, Iterator it) {
		this.v=v;
		return v.visit(this);
	}
}