Class ZeroOrPositiveIntValidator
java.lang.Object
com.amilesend.discogs.csv.validation.ZeroOrPositiveIntValidator
- All Implemented Interfaces:
ValueValidator
Validates that a value is a number that is zero or positive.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
validate
(String value, @NonNull InventoryHeader header, Integer row, Integer col) Validates a CSV attribute.
-
Constructor Details
-
ZeroOrPositiveIntValidator
public ZeroOrPositiveIntValidator(boolean isNullable)
-
-
Method Details
-
validate
public void validate(String value, @NonNull InventoryHeader header, Integer row, Integer col) throws ValidationException Description copied from interface:ValueValidator
Validates a CSV attribute.- Specified by:
validate
in interfaceValueValidator
- Parameters:
value
- to validateheader
- the associated headerrow
- the row indexcol
- the column index- Throws:
ValidationException
- if the field contains an invalid/malformed value
-