AdditionalReferencedDocumentsCode, AllowanceChargeReasonCode, CountryCode, CurrencyCode, DateFormatCode, DocumentTypeCode, FreeTextSubjectCode, GlobalIdentifierCode, IncotermsCode, LanguageCode, MeasurementUnitCode, NumberChecker, PaymentMeansCode, ProductClassificationSystemCode, QuantityCode, TaxCategoryCode, TaxIDTypeCode, TaxTypeCode, TransportIdentificationCode, TransportMeansCodepublic abstract class CodeValidation
extends java.lang.Object
| Constructor | Description |
|---|---|
CodeValidation() |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
check(java.lang.String code) |
Checks if a specific code is valid.
|
boolean |
isLowercase(java.lang.String code,
int chars) |
Checks the length of a code and if a code consists of lowercase letters
from a to z.
|
boolean |
isNumeric(java.lang.String code,
int digits) |
Checks the length of a code and if a code consists of numbers only.
|
boolean |
isUppercase(java.lang.String code,
int chars) |
Checks the length of a code and if a code consists of uppercase letters
from A to Z.
|
abstract boolean |
isValid(java.lang.String code) |
Checks if a specific code is valid.
|
public abstract boolean isValid(java.lang.String code)
code - the value you want to checkpublic java.lang.String check(java.lang.String code)
throws InvalidCodeException
code - the value you want to checkInvalidCodeException - reveals the reason why the code isn't validpublic boolean isNumeric(java.lang.String code,
int digits)
code - the code that needs to be checkeddigits - the expected length of the codepublic boolean isUppercase(java.lang.String code,
int chars)
code - the code that needs to be checkedchars - the expected length of the codepublic boolean isLowercase(java.lang.String code,
int chars)
code - the code that needs to be checkedchars - the expected length of the codeCopyright © 1998–2018. All rights reserved.