blob: 4ee978714c70764c5bb5804700d953768d51d22d [file] [log] [blame]
Vinod Kumar S0c330cd2016-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
Bharat saraswal96dfef02016-06-16 00:29:12 +053016import java.io.Serializable;
17
Gaurav Agrawal95b416c2016-06-07 14:00:26 +053018import org.onosproject.yangutils.datamodel.utils.builtindatatype.YangBuiltInDataTypeInfo;
Vidyashree Ramaa2f73982016-04-12 23:33:33 +053019
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053020/**
Bharat saraswald9822e92016-04-05 15:13:44 +053021 * Represents single interval information of a range.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053022 *
Vidyashree Ramaa2f73982016-04-12 23:33:33 +053023 * @param <T> range type based on the data type
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053024 */
Bharat saraswal96dfef02016-06-16 00:29:12 +053025public class YangRangeInterval<T extends YangBuiltInDataTypeInfo<T>> implements Serializable {
26
27 private static final long serialVersionUID = 806201650L;
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053028
29 /**
30 * Starting value of the range interval.
31 */
32 private T startValue;
33
34 /**
35 * Last value of the range interval.
36 */
37 private T endValue;
38
39 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053040 * Creates YANG range interval object.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053041 */
42 public YangRangeInterval() {
43 }
44
45 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053046 * Returns the starting value of the range interval.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053047 *
Vidyashree Ramaa2f73982016-04-12 23:33:33 +053048 * @return the starting value of the range interval
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053049 */
50 public T getStartValue() {
51 return startValue;
52 }
53
54 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053055 * Sets the starting value of the range interval.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053056 *
Vidyashree Ramaa2f73982016-04-12 23:33:33 +053057 * @param startValue the starting value of the range interval
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053058 */
59 public void setStartValue(T startValue) {
60 this.startValue = startValue;
61 }
62
63 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053064 * Returns the last value of the range interval.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053065 *
Vidyashree Ramaa2f73982016-04-12 23:33:33 +053066 * @return last value of the range interval
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053067 */
68 public T getEndValue() {
69 return endValue;
70 }
71
72 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053073 * Sets the last value of the range interval.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053074 *
Vidyashree Ramaa2f73982016-04-12 23:33:33 +053075 * @param endValue last value of the range interval
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053076 */
77 public void setEndValue(T endValue) {
78 this.endValue = endValue;
79 }
80
81}