Package org.onlab.util
Class ClosedOpenRange
- java.lang.Object
-
- org.onlab.util.ClosedOpenRange
-
@Beta public final class ClosedOpenRange extends Object
Represent a closed-open range. The primary user of this class is the ResourceService implementation.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)inthashCode()intlowerBound()Returns the lower bound.static ClosedOpenRangeof(int lowerBound, int upperBound)Create a range with a lower bound and an upper bound.static ClosedOpenRangeof(com.google.common.collect.Range<Integer> range)Creates a range from a Guava's range.StringtoString()intupperBound()Returns the upper bound.
-
-
-
Method Detail
-
of
public static ClosedOpenRange of(com.google.common.collect.Range<Integer> range)
Creates a range from a Guava's range.- Parameters:
range- Guava's range- Returns:
- this range
-
of
public static ClosedOpenRange of(int lowerBound, int upperBound)
Create a range with a lower bound and an upper bound.- Parameters:
lowerBound- lower bound (inclusive)upperBound- upper bound (exclusive)- Returns:
- this range
-
lowerBound
public int lowerBound()
Returns the lower bound.- Returns:
- the lower bound
-
upperBound
public int upperBound()
Returns the upper bound.- Returns:
- the upper bound
-
-