blob: 9914a5179fef3d262ffaf1edbc8e3ae51d90767f [file] [log] [blame]
Vinod Kumar Sc26bf192016-02-23 22:36:57 +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
Gaurav Agrawal58b348e2016-06-07 14:00:26 +053016import org.onosproject.yangutils.datamodel.utils.builtindatatype.YangBuiltInDataTypeInfo;
Vidyashree Ramabc9611f2016-04-12 23:33:33 +053017
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053018/**
Bharat saraswal63f26fb2016-04-05 15:13:44 +053019 * Represents single interval information of a range.
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053020 *
Vidyashree Ramabc9611f2016-04-12 23:33:33 +053021 * @param <T> range type based on the data type
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053022 */
Vidyashree Ramabc9611f2016-04-12 23:33:33 +053023public class YangRangeInterval<T extends YangBuiltInDataTypeInfo<T>> {
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053024
25 /**
26 * Starting value of the range interval.
27 */
28 private T startValue;
29
30 /**
31 * Last value of the range interval.
32 */
33 private T endValue;
34
35 /**
Bharat saraswal63f26fb2016-04-05 15:13:44 +053036 * Creates YANG range interval object.
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053037 */
38 public YangRangeInterval() {
39 }
40
41 /**
Bharat saraswal63f26fb2016-04-05 15:13:44 +053042 * Returns the starting value of the range interval.
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053043 *
Vidyashree Ramabc9611f2016-04-12 23:33:33 +053044 * @return the starting value of the range interval
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053045 */
46 public T getStartValue() {
47 return startValue;
48 }
49
50 /**
Bharat saraswal63f26fb2016-04-05 15:13:44 +053051 * Sets the starting value of the range interval.
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053052 *
Vidyashree Ramabc9611f2016-04-12 23:33:33 +053053 * @param startValue the starting value of the range interval
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053054 */
55 public void setStartValue(T startValue) {
56 this.startValue = startValue;
57 }
58
59 /**
Bharat saraswal63f26fb2016-04-05 15:13:44 +053060 * Returns the last value of the range interval.
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053061 *
Vidyashree Ramabc9611f2016-04-12 23:33:33 +053062 * @return last value of the range interval
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053063 */
64 public T getEndValue() {
65 return endValue;
66 }
67
68 /**
Bharat saraswal63f26fb2016-04-05 15:13:44 +053069 * Sets the last value of the range interval.
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053070 *
Vidyashree Ramabc9611f2016-04-12 23:33:33 +053071 * @param endValue last value of the range interval
Vinod Kumar Sc26bf192016-02-23 22:36:57 +053072 */
73 public void setEndValue(T endValue) {
74 this.endValue = endValue;
75 }
76
77}