Vinod Kumar S | c26bf19 | 2016-02-23 22:36:57 +0530 | [diff] [blame] | 1 | /*Copyright 2016.year Open Networking Laboratory |
| 2 | |
| 3 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | you may not use this file except in compliance with the License. |
| 5 | You may obtain a copy of the License at |
| 6 | |
| 7 | http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | |
| 9 | Unless required by applicable law or agreed to in writing, software |
| 10 | distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | See the License for the specific language governing permissions and |
| 13 | limitations under the License.*/ |
| 14 | package 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 | */ |
| 21 | public 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 | } |