Interface MultimapValidator<T extends Multimap<K,V>,K,V>
- Type Parameters:
T
- the type of theMultimap
K
- the type of keys in theMultimap
V
- the type of values in theMultimap
- All Superinterfaces:
ObjectComponent<MultimapValidator<T,
,K, V>, T> ValidatorComponent<MultimapValidator<T,
K, V>, T>
public interface MultimapValidator<T extends Multimap<K,V>,K,V>
extends ValidatorComponent<MultimapValidator<T,K,V>,T>, ObjectComponent<MultimapValidator<T,K,V>,T>
Validates the state of a Multimap, throwing an exception on the first failure.
-
Method Summary
Modifier and TypeMethodDescriptionentries()
Returns a validator over the Multimap'sentries
.isEmpty()
Ensures that the Multimap is empty.Ensures that the Multimap is not empty.keySet()
Returns a validator over the Multimap'skeys
.size()
Returns a validator over the Multimap'ssize
.values()
Returns a validator over the Multimap'svalues
.Methods declared in interface com.github.cowwoc.requirements10.java.validator.component.ObjectComponent
getValue, isEqualTo, isEqualTo, isInstanceOf, isInstanceOf, isNotEqualTo, isNotEqualTo, isNotInstanceOf, isNotInstanceOf, isNotNull, isNull, isReferenceEqualTo, isReferenceNotEqualTo
Methods declared in interface com.github.cowwoc.requirements10.java.validator.component.ValidatorComponent
and, elseGetFailures, elseThrow, getContext, getContextAsString, getName, getValueOrDefault, validationFailed, withContext
-
Method Details
-
isEmpty
MultimapValidator<T,K, isEmpty()V> Ensures that the Multimap is empty.- Returns:
- this
- Throws:
NullPointerException
- if the value is nullIllegalArgumentException
- if the Multimap is not empty
-
isNotEmpty
MultimapValidator<T,K, isNotEmpty()V> Ensures that the Multimap is not empty.- Returns:
- this
- Throws:
NullPointerException
- if the value is nullIllegalArgumentException
- if the Multimap is empty
-
keySet
CollectionValidator<Set<K>,K> keySet()Returns a validator over the Multimap'skeys
.- Returns:
- a validator over the Multimap's
keys
- Throws:
NullPointerException
- if the value is null
-
values
CollectionValidator<Collection<V>,V> values()Returns a validator over the Multimap'svalues
.- Returns:
- a validator over the Multimap's
values
- Throws:
NullPointerException
- if the value is null
-
entries
CollectionValidator<Collection<Map.Entry<K,V>>, entries()Map.Entry<K, V>> Returns a validator over the Multimap'sentries
.- Returns:
- a validator over the Multimap's
entries
- Throws:
NullPointerException
- if the value is null
-
size
Returns a validator over the Multimap'ssize
.- Returns:
- a validator over the Multimap's
size
. - Throws:
NullPointerException
- if the value is null
-