public class NumberInterval extends Object
| Constructor and Description |
|---|
NumberInterval(NumberRange baseRange,
NumberRange excludedRange,
Number lowerBound,
BoundType lowerBoundType,
Number upperBound,
BoundType upperBoundType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsNumber(Number number) |
void |
enumerateNumbers(Collection<Object> numbers) |
NumberInterval |
intersectWith(NumberInterval that)
Computes the intersection of this interval with the supplied one.
|
int |
subtractSizeFrom(int argument)
Subtracts from the given argument the number of distinct objects that are contained in this interval.
|
String |
toString() |
public NumberInterval(NumberRange baseRange, NumberRange excludedRange, Number lowerBound, BoundType lowerBoundType, Number upperBound, BoundType upperBoundType)
baseRange - rangeexcludedRange - exclusionlowerBound - lower boundlowerBoundType - lower typeupperBound - upper boundupperBoundType - upper typepublic NumberInterval intersectWith(NumberInterval that)
that - thatpublic int subtractSizeFrom(int argument)
argument - argumentpublic boolean containsNumber(Number number)
number - number to checkpublic void enumerateNumbers(Collection<Object> numbers)
numbers - collection to add toCopyright © 2020. All rights reserved.