Class ElementCountConstraint
java.lang.Object
org.opendaylight.yangtools.yang.model.api.ElementCountConstraint
Contains method which returns various data constraints for a list-like YANG element
(e.g. min or max number of elements).
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull ElementCountConstraint
atLeast
(int minElements) static @NonNull ElementCountConstraint
atMost
(int maxElements) final boolean
static @NonNull Optional<ElementCountConstraint>
forNullable
(@Nullable Integer minElements, @Nullable Integer maxElements) abstract @Nullable Integer
Returns the maximum admissible number of data elements for node where this constraint is specified.abstract @Nullable Integer
Returns the minimum required number of data elements for node where this constraint is specified.final int
hashCode()
static @NonNull ElementCountConstraint
inRange
(int minElements, int maxElements) final String
toString()
-
Method Details
-
atLeast
-
atMost
-
inRange
-
forNullable
public static @NonNull Optional<ElementCountConstraint> forNullable(@Nullable Integer minElements, @Nullable Integer maxElements) -
getMinElements
Returns the minimum required number of data elements for node where this constraint is specified.The returning value equals to value of the argument of the min-elements YANG substatement. It is used with YANG statements leaf-list, list, deviate.
- Returns:
- integer with minimal number of elements, or null if no minimum is defined
-
getMaxElements
Returns the maximum admissible number of data elements for node where this constraint is specified.The returning value equals to value of the argument of the max-elements YANG substatement. It is used with YANG statements leaf-list, list, deviate.
- Returns:
- integer with maximum number of elements, or null if no maximum is defined
-
hashCode
public final int hashCode() -
equals
-
toString
-