Cleanup checkstyle in yang-{data,model}-api
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / stmt / IdentityStatement.java
1 /*
2  * Copyright (c) 2015 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.yangtools.yang.model.api.stmt;
9
10 import com.google.common.collect.ImmutableList;
11 import java.util.Collection;
12 import javax.annotation.Nonnull;
13 import javax.annotation.Nullable;
14 import org.opendaylight.yangtools.yang.common.QName;
15 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
16
17 public interface IdentityStatement extends DeclaredStatement<QName>, DocumentationGroup.WithStatus, ConditionalFeature {
18
19     @Nonnull QName getName();
20
21     /**
22      * Returns the base identity.
23      * @deprecated use {@link #getBases()} instead
24      *
25      * @return base statement
26      */
27     @Deprecated
28     @Nullable
29     BaseStatement getBase();
30
31     // FIXME: version 2.0.0: make this method non-default
32     @Nonnull default Collection<? extends BaseStatement> getBases() {
33         final BaseStatement base = getBase();
34         return base == null ? ImmutableList.of() : ImmutableList.of(base);
35     }
36 }