Cleanup checkstyle in yang-{data,model}-api
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / ChoiceSchemaNode.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;
9
10 import java.util.Set;
11 import org.opendaylight.yangtools.yang.common.QName;
12
13 /**
14  * A ChoiceSchemaNode defines a set of alternatives. It consists of a number of
15  * branches defined as ChoiceCaseSchemaNode objects.
16  */
17 public interface ChoiceSchemaNode extends DataSchemaNode, AugmentationTarget {
18     /**
19      * Returns cases of choice.
20      *
21      * @return set of ChoiceCaseNode objects defined in this node which
22      *         represents set of arguments of the YANG <code>case</code>
23      *         substatement of the <code>choice</code> statement
24      */
25     Set<ChoiceCaseNode> getCases();
26
27     /**
28      * Returns the concrete case according to specified Q name.
29      *
30      * @param name
31      *            QName of seeked Choice Case Node
32      * @return child case node of this Choice if child with given name is
33      *         present, <code>null</code> otherwise
34      */
35     ChoiceCaseNode getCaseNodeByName(QName name);
36
37     /**
38      * Returns the concrete case according to specified name.
39      *
40      * @param name
41      *            name of seeked child as String
42      * @return child case node (or local name of case node) of this Choice if
43      *         child with given name is present, <code>null</code> otherwise
44      */
45     ChoiceCaseNode getCaseNodeByName(String name);
46
47     /**
48      * Returns name of case which is in the choice specified as default.
49      *
50      * @return string with the name of case which is specified in the argument
51      *         of the YANG <code>default</code> substatement of
52      *         <code>choice</code> statement.
53      */
54     String getDefaultCase();
55
56 }