Class CurrencyCode
java.lang.Object
com.itextpdf.text.zugferd.checkers.CodeValidation
com.itextpdf.text.zugferd.checkers.basic.CurrencyCode
Class that can be used to check if a currency code is well-formed.
IMPORTANT: this doesn't check if the code is valid in the sense that
it doesn't check the code against a list of currencies.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.itextpdf.text.zugferd.checkers.CodeValidation
check, isLowercase, isNumeric, isUppercase
-
Constructor Details
-
CurrencyCode
public CurrencyCode()
-
-
Method Details
-
isValid
The code list provided with the ZUGFeRD standard only lists four codes: EUR, USD, GBP and COP. Obviously, there are more codes available (in ISO 4217-3A). We won't check the presence of a code in ISO 4217-3A, but we'll check if the code consists of three letters and if it's uppercase.- Specified by:
isValid
in classCodeValidation
- Parameters:
code
- the code to be tested- Returns:
- true if the code has the correct format
-