package edu.umich.soar.hpp;

/**
 * Specialization of multi-valued variables for the
 * case of binary values.
 */
public class HPPBinaryVariable extends HPPMultiVariable {

	/**
	 * Basic constructor - uses basic constructor of multi-variable
	 * 
	 * @param name variable name
	 * @param defaultValue default value, or null for none
	 */
	public HPPBinaryVariable(String name, Boolean defaultValue) {
		super(name, ((defaultValue == null)?(null):(defaultValue.toString())));
	}
		
	/**
	 * Advanced constructor to initialize the cpt with binary entries
	 * 
	 * @param name variable name
	 * @param defaultValue default value, or null for none
	 * @param cpt array of binary cpt entries
	 */
	public HPPBinaryVariable(String name, Boolean defaultValue, HPPCPTBinaryEntry[] cpt) {
		this(name, defaultValue);
		addCPTEntries(cpt);
	}
	
	/* (non-Javadoc)
	 * @see edu.umich.soar.hpp.HPPMultiVariable#getType()
	 */
	public String getType() {
		return "binary";
	}
	
}
