Package cec.taxud.fiscalis.vies.common.vat

Examples of cec.taxud.fiscalis.vies.common.vat.ValidationRoutine


   */
  public static boolean validate (String vat) {
    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;
  }
View Full Code Here


   * @param vat The VAT number we are validating
   * @return Whether or not this VAT number ir valid in the specified country
   */

  public static boolean testCountryNif(String country, String vat) {
    ValidationRoutine routine = (ValidationRoutine) VALIDATORS.get(country);
    if (routine == null)
      return false;


    return routine.check(vat);
  }
View Full Code Here

TOP

Related Classes of cec.taxud.fiscalis.vies.common.vat.ValidationRoutine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.