How to use Java Argument Validation

Example: Basic Usage

Check that the incoming arguments are not null.

View the above class ValidationDataSourceVersion on a separate page.

Example: Argument Validation with Regular Expressions and a Country Set

The following checks are done:

  • Check that the incoming argument houseNumber is greater then 0.
  • Check that the incoming argument street or postbox is not null.
  • Check that the incoming argument postalCode applies to the Dutch postal code, meaning 4 digits followed by to Latin characters.
  • Check that the incoming argument city is not null.
  • Check that the incoming argument country is within the Set of countries.


View the above class Address on a separate page.