package dkohl.bayes.probability;

/**
 * A named variable with a domain of possible values it can take
 * 
 * @author Daniel Kohlsdorf
 */
public class Variable {

	/**
	 * The name of the variable
	 */
	private String name;

	/**
	 * The domain of the variable
	 */
	private String domain[];

	public Variable(String name, String[] domain) {
		super();
		this.name = name;
		this.domain = domain;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String[] getDomain() {
		return domain;
	}

	public void setDomain(String[] domain) {
		this.domain = domain;
	}

	public int domainSize() {
		return domain.length;
	}

	@Override
	public String toString() {
		return name;
	}
}
