public class Limit extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
inclusive |
private boolean |
infinite |
static Limit |
NEGATIVE_INFINITY |
private Number |
number |
static Limit |
POSITIVE_INFINITY |
Constructor and Description |
---|
Limit(Number number,
boolean inclusive) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isInclusive()
Returns true if this limit includes its number, false if it excludes it
|
boolean |
isInfinite() |
boolean |
isLargerOrEqualTo(Limit other) |
boolean |
isSmallerOrEqualTo(Limit other) |
Limit |
max(Limit other)
Returns the larger of this and the given limit
|
Limit |
min(Limit other)
Returns the smaller of this and the given limit
|
Number |
number() |
(package private) String |
toRangeEnd() |
(package private) String |
toRangeStart() |
String |
toString() |
public static final Limit NEGATIVE_INFINITY
public static final Limit POSITIVE_INFINITY
private final Number number
private final boolean inclusive
private final boolean infinite
public Limit(Number number, boolean inclusive)
public Number number()
public boolean isInclusive()
String toRangeStart()
String toRangeEnd()
public boolean isSmallerOrEqualTo(Limit other)
public boolean isLargerOrEqualTo(Limit other)
public boolean isInfinite()
Copyright © 2017. All rights reserved.