package generated.javacard.mondex.purse;

/**
 * Generated Class
 * 
 */
public class Req extends Message implements Codeable {

	public EncDataSymm encmess;

	/**
	 * Constructor wich sets all attributes to a initial value
	 */
	public Req() {
		encmess = new EncDataSymm();
	}

	/**
	 * Method for getting the typeflag
	 *
	 * @return den class-specific code
	 */
	public byte getCode() {
		return Code.REQ;
	}

	/**
	 * This method deeply checks equality of classes.
	 *
	 * @param other Class to compare with
	 * @return true, if values of all attributes are equal
	 */
	public boolean equals(Codeable other) {
		//The types of the objects have to match
		if (getCode() != other.getCode())
			return false;
		//Attributes of complex type: Use their equals-method
		if (!this.encmess.equals(((Req) other).encmess))
			return false;
		return true;
	}

	public void copy(Req from) {
		//Complex types: Use their copy-method.
		this.encmess.copy(from.encmess);
	}

}