[Impressum] [E-Mail]

package generated.javacard.copycardMoneySecure.copycard;

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

	public short balance;

	/**
	 * Constructor wich sets all attributes to a initial value
	 */
	public ResRequestBalance() {
		balance = 0;
	}

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

	/**
	 * 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;
		//balance is of primitive type: We can use ==
		if (this.balance != ((ResRequestBalance) other).balance)
			return false;
		return true;
	}

	public void copy(ResRequestBalance from) {
		//balance is of primitive type: simple assignment
		this.balance = from.balance;
	}

}