Interface GuavaRequireThat
- All Known Subinterfaces:
GuavaValidators
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Creates validators for the Guava API that throw exceptions immediately on validation failure.
-
Method Summary
Modifier and TypeMethodDescription<K, V, T extends com.google.common.collect.Multimap<K,V>>
MultimapValidator<T, K, V> requireThat(T value, String name) Validates the state of aMultimap.
-
Method Details
-
requireThat
<K, V, T extends com.google.common.collect.Multimap<K,V>> MultimapValidator<T,K, requireThatV> (T value, String name) Validates the state of aMultimap.The returned validator throws an exception immediately if a validation fails.
- Type Parameters:
K- the type of keys in theMultimapV- the type of values in theMultimapT- the type of theMultimap- Parameters:
value- the valuename- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException- ifnameis nullIllegalArgumentException- ifnamecontains whitespace, or is empty
-