A race condition occurs between ARPHandler and HostTracker if the ARP
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-model-api / src / main / java / org / opendaylight / controller / yang / model / api / type / LengthConstraint.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.yang.model.api.type;
9
10 import org.opendaylight.controller.yang.model.api.ConstraintMetaDefinition;
11
12 /**
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>
16  * <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,
21  * respectively. <br>
22  * An implementation is not required to support a length value larger than
23  * {@link Long#MAX_VALUE} <br>
24  * <br>
25  * The interface extends definitions from {@link ConstraintMetaDefinition} <br>
26  * <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>.
30  *
31  * @see ConstraintMetaDefinition
32  */
33 public interface LengthConstraint extends ConstraintMetaDefinition {
34
35     /**
36      * Returns the length-restricting lower bound value. <br>
37      * The value MUST NOT be negative.
38      *
39      * @return the length-restricting lower bound value.
40      */
41     Number getMin();
42
43     /**
44      * Returns the length-restricting upper bound value. <br>
45      * The value MUST NOT be negative.
46      *
47      * @return length-restricting upper bound value.
48      */
49     Number getMax();
50 }