232233234235236237238239240241242
int i = 0; for (; i < vat.length(); ++i) { String prefix = vat.substring(0, i); ValidationRoutine routine = (ValidationRoutine) VALIDATORS.get(prefix); if (routine != null) { return routine.check(vat.substring(i)); } } return false; }
254255256257258259260261262263
ValidationRoutine routine = (ValidationRoutine) VALIDATORS.get(country); if (routine == null) return false; return routine.check(vat); } }