@Override protected boolean validate(PreparedAccountNumber accountNumber) { Validator validator; if (extractAsInt(accountNumber.getZeroFilled(), 9) == 8) { validator = new Validator61B(); } else { validator = new Validator61A(); } return validator.isValid(accountNumber.getRawNumber()); }
@Override protected boolean validate(PreparedAccountNumber accountNumber) { Validator validator = new Validator07(); if (!validator.isValid(accountNumber.getRawNumber(), accountNumber.getBankNumber())) { validator = new Validator03(); if (!validator.isValid(accountNumber.getRawNumber(), accountNumber.getBankNumber())) { validator = new Validator00(); return validator.isValid(accountNumber.getRawNumber(), accountNumber.getBankNumber()); } } return true; }
@Override protected boolean validate(PreparedAccountNumber accountNumber) { Validator validator; if (extractAsInt(accountNumber.getZeroFilled(), 1) == 5) { validator = new ValidatorC1V2(); return validator.isValid(accountNumber.getRawNumber(), accountNumber.getBankNumber()); } validator = new Validator17(); return validator.isValid(accountNumber.getRawNumber(), accountNumber.getBankNumber()); }
@Override protected boolean validate(PreparedAccountNumber accountNumber) { Validator validator; if ((extractAsInt(accountNumber.getZeroFilled(), 1) >= 1 && extractAsInt(accountNumber.getZeroFilled(), 1) <= 9) || (extractAsInt(accountNumber.getZeroFilled(), 1, 5) >= 2691 && extractAsInt(accountNumber.getZeroFilled(), 1, 5) <= 2699)) { validator = new Validator20(); return validator.isValid(accountNumber.getRawNumber(), accountNumber.getBankNumber()); } validator = new Validator53(); return validator.isValid(accountNumber.getRawNumber(), accountNumber.getBankNumber()); }
@Override protected boolean validate(PreparedAccountNumber accountNumber) { Validator validator = new ValidatorA5V1(); if (!validator.isValid(accountNumber.getRawNumber(), accountNumber.getBankNumber())) { if (accountNumber.getLength() == 10 && extract(accountNumber.getZeroFilled(), 1).equals("9")) { return false; } validator = new ValidatorA5V2(); return validator.isValid(accountNumber.getRawNumber(), accountNumber.getBankNumber()); } return true; }