Populate data/ hierarchy
[yangtools.git] / model / yang-model-ri / src / main / java / org / opendaylight / yangtools / yang / model / ri / type / DerivedBitsType.java
1 /*
2  * Copyright (c) 2015 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 org.opendaylight.yangtools.yang.common.QName;
12 import org.opendaylight.yangtools.yang.model.api.Status;
13 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
14 import org.opendaylight.yangtools.yang.model.api.type.BitsTypeDefinition;
15
16 final class DerivedBitsType extends AbstractDerivedType<BitsTypeDefinition> implements BitsTypeDefinition {
17     DerivedBitsType(final BitsTypeDefinition baseType, final QName qname, final Object defaultValue,
18             final String description, final String reference, final Status status, final String units,
19             final Collection<? extends UnknownSchemaNode> unknownSchemNodes) {
20         super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemNodes);
21     }
22
23     @Override
24     public Collection<? extends Bit> getBits() {
25         return baseType().getBits();
26     }
27
28     @Override
29     public int hashCode() {
30         return BitsTypeDefinition.hashCode(this);
31     }
32
33     @Override
34     public boolean equals(final Object obj) {
35         return BitsTypeDefinition.equals(this, obj);
36     }
37 }