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