blob: ba42bfc63b5f3ca5f2f7e63b20bed37542a034e2 [file] [log] [blame]
Vinod Kumar S19f39c72016-02-09 20:12:31 +05301/*Copyright 2016.year Open Networking Laboratory
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.*/
14package org.onosproject.yangutils.datamodel;
15
16import java.util.List;
17
18/**
19 * Abstraction of atomic configurable/status entity. It is used to abstract the
20 * data holders of leaf or leaf list. Used in leaves parsing or attribute code
21 * generation.
22 */
23public interface YangLeavesHolder {
24
25 /**
26 * Get the list of leaves from data holder like container / list.
27 *
28 * @return the list of leaves.
29 */
Bharat saraswal870c56f2016-02-20 21:57:16 +053030 public List<YangLeaf<?>> getListOfLeaf();
Vinod Kumar S19f39c72016-02-09 20:12:31 +053031
32 /**
33 * Add a leaf in data holder like container / list.
34 *
35 * @param leaf the leaf to be added.
36 */
37 void addLeaf(YangLeaf<?> leaf);
38
39 /**
40 * Get the list of leaf-list from data holder like container / list.
41 *
42 * @return the list of leaf-list.
43 */
Bharat saraswal870c56f2016-02-20 21:57:16 +053044 List<YangLeafList<?>> getListOfLeafList();
Vinod Kumar S19f39c72016-02-09 20:12:31 +053045
46 /**
47 * Add a leaf-list in data holder like container / list.
48 *
49 * @param leafList the leaf-list to be added.
50 */
51 void addLeafList(YangLeafList<?> leafList);
52}