package background.systemVariables;

public class CharacterVariable extends SimpleVariable {
	private char value;	

	/* ============================================= */
	
	public CharacterVariable(String xValue) {
		this.setValue(xValue.charAt(0));
		this.setVizualize(false);
	}
	
	public CharacterVariable(String xValue, Boolean viz) {
		this.setValue(xValue.charAt(0));
		this.setVizualize(viz);
	}
	
	public CharacterVariable(char xValue) {
		this.setValue(xValue);
		this.setVizualize(false);
	}
	
	public CharacterVariable(char xValue, Boolean viz) {
		this.setValue(xValue);
		this.setVizualize(viz);
	}


	/* ============================================= */
	
	public void setValue(char xValue) {
		super.setValue();
		value = xValue;		
	}
	
	public void setValue(String s) {
		this.setValue(s.charAt(0));
	}
	
	@Override
	public String getType() {
		return "char";
	}
	
	@Override
	public char getValue(char c) {
		return value;
	}	
	
	public String getValue(String s) {
		return Character.toString(value);
	}

}
