/**
 * 
 */
package dspl.intermediate.variable;

/**
 * DSPLUInteger is the Variable for the unsigned integer type
 * @author David
 */
public class DSPLUInteger extends Variable {
	/* (non-Javadoc)
	 * @see dspl.intermediate.variable.Variable#Variable(int)
	 */
	public DSPLUInteger(int numElements) { 
		super(numElements); 
	}
	
	/* (non-Javadoc)
	 * @see dspl.intermediate.variable.Variable#isNumeric()
	 */
	public boolean isNumeric() {
		return true; 
	}

	public int getDataTypeByteSize() {
		return 4; 
	}

	public int getDataType() {
		return Variable.DATA_TYPE_UINT;
	}


	/* (non-Javadoc)
	 * @see dspl.intermediate.variable.Variable#convertToObject(java.lang.String)
	 */
	public Object convertToObject(String strValue) {
		return new Long(strValue); 
	}

	/* (non-Javadoc)
	 * @see dspl.intermediate.variable.Variable#convertToObject(java.lang.String,java.lang.String)
	 */
	public Object convertToObject(String strValue1, String strValue2) {
		throw new Error("Error: convertToObject(String, String) called on " + this.getClass().toString()); 
	}

	/* (non-Javadoc)
	 * @see dspl.intermediate.variable.Variable#isNaturalNum
	 */
	public boolean isNaturalNum() {
		return true; 
	}
}
