[Impressum]
[E-Mail]
package generated.javacard.copycardMoneySecure.copycard;
/**
* Generated Class
*
*/
public class Pay extends Message implements Codeable {
public short amount;
public Nonce terminalchallenge;
/**
* Constructor wich sets all attributes to a initial value
*/
public Pay() {
amount = 0;
terminalchallenge = new Nonce();
}
/**
* Method for getting the typeflag
*
* @return den class-specific code
*/
public byte getCode() {
return Code.PAY;
}
/**
* 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;
//amount is of primitive type: We can use ==
if (this.amount != ((Pay) other).amount)
return false;
//Attributes of complex type: Use their equals-method
if (!this.terminalchallenge.equals(((Pay) other).terminalchallenge))
return false;
return true;
}
public void copy(Pay from) {
//amount is of primitive type: simple assignment
this.amount = from.amount;
//Complex types: Use their copy-method.
this.terminalchallenge.copy(from.terminalchallenge);
}
}