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 com.google.common.collect.RangeSet;
11 import org.opendaylight.yangtools.yang.model.api.ConstraintMetaDefinition;
14 * A single value length restriction, as expressed by a length statement, as specified by
15 * <a href="https://tools.ietf.org/html/rfc6020#section-9.4.4">[RFC-6020] The length Statement</a>.
17 public interface LengthConstraint extends ConstraintMetaDefinition {
19 * Return allowed length ranges. Returned RangeSet must not be empty.
21 * @return Set of allowed lengths.
23 RangeSet<Integer> getAllowedRanges();