Class ElementCountConstraint


  • @Beta
    public abstract class ElementCountConstraint
    extends Object
    Contains method which returns various data constraints for a list-like YANG element (e.g. min or max number of elements).
    • Method Detail

      • getMinElements

        public abstract @Nullable Integer 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

        public abstract @Nullable Integer 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()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object