/******************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 2013,2014 by Peter Pilgrim, Addiscombe, Surrey, XeNoNiQUe UK * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU GPL v3.0 * which accompanies this distribution, and is available at: * http://www.gnu.org/licenses/gpl-3.0.txt * * Developers: * Peter Pilgrim -- design, development and implementation * -- Blog: http://www.xenonique.co.uk/blog/ * -- Twitter: @peter_pilgrim * * Contributors: * *******************************************************************************/ package je7hb.beanvalidation.payments; import javax.validation.constraints.DecimalMax; import javax.validation.constraints.DecimalMin; import javax.validation.constraints.Size; import java.math.BigDecimal; /** * The type Account * * @author Peter Pilgrim */ public class Account { @Size(min=8,max=12) private final String account; @DecimalMin("0.0") private final BigDecimal amount; public Account(String account, BigDecimal amount) { this.account = account; this.amount = amount; } public String getAccount() { return account; } public BigDecimal getAmount() { return amount; } @Override public String toString() { return "Account{" + "account='" + account + '\'' + ", amount=" + amount + '}'; } }