Package com.yahoo.config.provision
Class IntRange
java.lang.Object
com.yahoo.config.provision.IntRange
An integer range.
- Author:
- bratseth
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IntRangeempty()booleanintfit(int value) Returns the given value adjusted minimally to fit within this range.from()Returns the minimum value which is in this range, or empty if it is open downwards.static IntRangefrom(int from) static IntRangeParses a value ("value"), value range ("[min-value?fromAtMost(int minLimit) Returns this with a 'from' limit which is at most the given valueinthashCode()booleanincludes(int value) Returns whether the given value is in this range.booleanisEmpty()Returns true if both from and to is open (not present).static IntRangeof(int fromTo) static IntRangeof(int from, int to) to()Returns the maximum value which is in this range, or empty if it is open upwards.static IntRangeto(int to) toAtLeast(int maxLimit) Returns this with a 'to' limit which is at least the given valuetoString()
-
Constructor Details
-
IntRange
-
-
Method Details
-
from
Returns the minimum value which is in this range, or empty if it is open downwards. -
to
Returns the maximum value which is in this range, or empty if it is open upwards. -
isEmpty
public boolean isEmpty()Returns true if both from and to is open (not present). -
includes
public boolean includes(int value) Returns whether the given value is in this range. -
fit
public int fit(int value) Returns the given value adjusted minimally to fit within this range. -
equals
-
hashCode
public int hashCode() -
toString
-
empty
-
from
-
to
-
of
-
of
-
fromAtMost
Returns this with a 'from' limit which is at most the given value -
toAtLeast
Returns this with a 'to' limit which is at least the given value -
from
Parses a value ("value"), value range ("[min-value?, max-value?]"), or empty.
-