Interface GuavaCheckIf
- All Known Subinterfaces:
GuavaValidators
public interface GuavaCheckIf
Creates validators for the Guava API that capture exceptions on validation failure rather than throwing
them immediately.
-
Method Summary
Modifier and TypeMethodDescription<K,
V, T extends Multimap<K, V>>
MultimapValidator<T, K, V> checkIf
(T value) Validates the state of aMultimap
.<K,
V, T extends Multimap<K, V>>
MultimapValidator<T, K, V> Validates the state of aMultimap
.
-
Method Details
-
checkIf
Validates the state of aMultimap
.The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.
- Type Parameters:
K
- the type of keys in theMultimap
V
- the type of values in theMultimap
T
- the type of theMultimap
- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace, or is empty
-
checkIf
Validates the state of aMultimap
.The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.
- Type Parameters:
K
- the type of keys in theMultimap
V
- the type of values in theMultimap
T
- the type of theMultimap
- Parameters:
value
- the value- Returns:
- a validator for the value
-