package simulator.states;

import models.algebra.Constant;
import models.dataConstraintModel.DataConstraintModel;

public class PrimitiveResourceState extends ResourceState {
	private Constant value;
	
	public PrimitiveResourceState(Constant initialValue) {
		value = initialValue;
	}
	
	@Override
	public Constant getValue() {
		if (value == null) return new Constant(DataConstraintModel.null_);
		return value;
	}
	
	public void setValue(Constant newValue) {
		value = newValue;
	}

	@Override
	boolean hasChildren() {
		return false;
	}
	
	public Object clone() {
		return this;
	}
}
