Class Assert.ArrayAsserter<T>
java.lang.Object
tech.jhipster.lite.shared.error.domain.Assert.ArrayAsserter<T>
- Enclosing class:
Assert
Asserter dedicated to arrays assertions
-
Method Details
-
notNull
Ensure that the value is not null- Returns:
- The current asserter
- Throws:
MissingMandatoryValueException- if the value is null
-
notEmpty
Ensure that the value is not empty (null or empty)- Returns:
- The current asserter
- Throws:
MissingMandatoryValueException- if the value is null or empty
-
maxSize
Ensure that the size of the given input value is not over the given size- Parameters:
maxSize- inclusive max size of the array- Returns:
- The current asserter
- Throws:
MissingMandatoryValueException- if the expected size is strictly positive and the value is nullTooManyElementsException- if the size of value is over the max size
-
noNullElement
Ensure that no element in this array is null- Returns:
- The current asserter
- Throws:
NullElementInCollectionException- if an element is null
-