blob: d3061a7e50be87d1176b1a556ac69f2acc36b38f [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/**
17 * Single interval information of a range.
18 *
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 /**
34 * Default constructor.
35 */
36 public YangRangeInterval() {
37 }
38
39 /**
40 * Get the starting value of the range interval.
41 *
42 * @return the starting value of the range interval.
43 */
44 public T getStartValue() {
45 return startValue;
46 }
47
48 /**
49 * Set the starting value of the range interval.
50 *
51 * @param startValue the starting value of the range interval.
52 */
53 public void setStartValue(T startValue) {
54 this.startValue = startValue;
55 }
56
57 /**
58 * Get the last value of the range interval.
59 *
60 * @return last value of the range interval.
61 */
62 public T getEndValue() {
63 return endValue;
64 }
65
66 /**
67 * Set the last value of the range interval.
68 *
69 * @param endValue last value of the range interval.
70 */
71 public void setEndValue(T endValue) {
72 this.endValue = endValue;
73 }
74
75}