Populate model/ hierarchy
[yangtools.git] / model / yang-model-ri / src / main / java / org / opendaylight / yangtools / yang / model / ri / type / AbstractLengthRestrictedDerivedType.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.yangtools.yang.model.ri.type;
9
10 import java.util.Collection;
11 import java.util.Optional;
12 import org.opendaylight.yangtools.yang.common.QName;
13 import org.opendaylight.yangtools.yang.model.api.Status;
14 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
15 import org.opendaylight.yangtools.yang.model.api.type.LengthConstraint;
16 import org.opendaylight.yangtools.yang.model.api.type.LengthRestrictedTypeDefinition;
17
18 abstract class AbstractLengthRestrictedDerivedType<T extends LengthRestrictedTypeDefinition<T>>
19         extends AbstractDerivedType<T> implements LengthRestrictedTypeDefinition<T> {
20     AbstractLengthRestrictedDerivedType(final T baseType, final QName qname,
21             final Object defaultValue, final String description, final String reference, final Status status,
22             final String units, final Collection<? extends UnknownSchemaNode> unknownSchemaNodes) {
23         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemaNodes);
24     }
25
26     @Override
27     public final Optional<LengthConstraint> getLengthConstraint() {
28         return baseType().getLengthConstraint();
29     }
30 }