2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.model.api.type;
10 import org.opendaylight.yangtools.yang.model.api.ConstraintMetaDefinition;
13 * The Lenght Constraint value consists of an explicit value, or a lower bound
14 * returned by {@link #getMin()} and an upper bound returned by
15 * {@link #getMax()}. <br>
17 * Length-restricting values MUST NOT be negative. A length value is a
18 * non-negative integer, or one of the special values <code>min</code> or
19 * <code>max</code>. The defined <code>min</code> and <code>max</code> mean the
20 * minimum and maximum length accepted for the type being restricted,
22 * An implementation is not required to support a length value larger than
23 * {@link Long#MAX_VALUE} <br>
25 * The interface extends definitions from {@link ConstraintMetaDefinition} <br>
27 * This interface was modeled according to definition in <a
28 * href="https://tools.ietf.org/html/rfc6020#section-9.4.4">[RFC-6020] The
29 * length Statement</a>.
31 * @see ConstraintMetaDefinition
33 public interface LengthConstraint extends ConstraintMetaDefinition {
36 * Returns the length-restricting lower bound value. <br>
37 * The value MUST NOT be negative.
39 * @return the length-restricting lower bound value.
44 * Returns the length-restricting upper bound value. <br>
45 * The value MUST NOT be negative.
47 * @return length-restricting upper bound value.