/**
 * 
 */
package types;

/**
 * @author  Giorgio Ravera
 */
public abstract class Symbol 
{
	protected String valore;
	protected int tipo;
	
	public Symbol(String s, int t)
	{
		tipo = t;
		valore = s;
	}
	
	public int getType() { return tipo; }
	
	/**
	 * @return
	 * @uml.property  name="valore"
	 */
	public String getValore() {	return this.valore; }
	
	public boolean equals(Object o)
	{
		if(o==null || !(o instanceof Symbol))
			return false;
		else if(o == this)
			return true;
		else
		{
			Symbol s = (Symbol)o;
			return tipo==s.tipo && valore==s.valore;
		}
	}
}
