blob: 442cda0a11af41e4e22f9470bb12aded97027dcd [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
16/**
Bharat saraswald9822e92016-04-05 15:13:44 +053017 * Represents single interval information of a range.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053018 *
19 * @param <T> range type based on the data type.
20 */
21public class YangRangeInterval<T extends Comparable<T>> {
22
23 /**
24 * Starting value of the range interval.
25 */
26 private T startValue;
27
28 /**
29 * Last value of the range interval.
30 */
31 private T endValue;
32
33 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053034 * Creates YANG range interval object.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053035 */
36 public YangRangeInterval() {
37 }
38
39 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053040 * Returns the starting value of the range interval.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053041 *
42 * @return the starting value of the range interval.
43 */
44 public T getStartValue() {
45 return startValue;
46 }
47
48 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053049 * Sets the starting value of the range interval.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053050 *
51 * @param startValue the starting value of the range interval.
52 */
53 public void setStartValue(T startValue) {
54 this.startValue = startValue;
55 }
56
57 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053058 * Returns the last value of the range interval.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053059 *
60 * @return last value of the range interval.
61 */
62 public T getEndValue() {
63 return endValue;
64 }
65
66 /**
Bharat saraswald9822e92016-04-05 15:13:44 +053067 * Sets the last value of the range interval.
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053068 *
69 * @param endValue last value of the range interval.
70 */
71 public void setEndValue(T endValue) {
72 this.endValue = endValue;
73 }
74
75}