public class Range<RangeType extends Comparable<RangeType>> extends Object implements Bounded<RangeType>
| Constructor and Description |
|---|
Range(RangeType lowerBound,
RangeType upperBound)
Creates a new Range.
|
| Modifier and Type | Method and Description |
|---|---|
RangeType |
getLowerBound()
Returns the lower bound specified for this object.
|
RangeType |
getUpperBound()
Returns the upper bound specified for this object.
|
static <Type extends Comparable<Type>> |
of(Type bound)
Creates a new Range, where lower and upper bond are identical.
|
static <Type extends Comparable<Type>> |
of(Type lowerBound,
Type upperBound)
Creates a new Range.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitassertIfValueInRange, isInRangepublic static <Type extends Comparable<Type>> Range<Type> of(Type lowerBound, Type upperBound)
Type - The type of Comparable used.lowerBound - The lower bond.upperBound - The upper bond.public static <Type extends Comparable<Type>> Range<Type> of(Type bound)
Type - The type of Comparable used.bound - The bond.public RangeType getLowerBound()
BoundedgetLowerBound in interface Bounded<RangeType extends Comparable<RangeType>>public RangeType getUpperBound()
BoundedgetUpperBound in interface Bounded<RangeType extends Comparable<RangeType>>Copyright © 2017. All rights reserved.