Package com.yahoo.prelude.query
Class Limit
- java.lang.Object
-
- com.yahoo.prelude.query.Limit
-
public class Limit extends Object
An immutable numeric range limit which can be inclusive or exclusive- Author:
- bratseth
-
-
Field Summary
Fields Modifier and Type Field Description static Limit
NEGATIVE_INFINITY
static Limit
POSITIVE_INFINITY
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
boolean
isInclusive()
Returns true if this limit includes its number, false if it excludes itboolean
isInfinite()
boolean
isLargerOrEqualTo(Limit other)
boolean
isSmallerOrEqualTo(Limit other)
Limit
max(Limit other)
Returns the larger of this and the given limitLimit
min(Limit other)
Returns the smaller of this and the given limitNumber
number()
String
toString()
-
-
-
Constructor Detail
-
Limit
public Limit(Number number, boolean inclusive)
-
-
Method Detail
-
number
public Number number()
-
isInclusive
public boolean isInclusive()
Returns true if this limit includes its number, false if it excludes it
-
isSmallerOrEqualTo
public boolean isSmallerOrEqualTo(Limit other)
-
isLargerOrEqualTo
public boolean isLargerOrEqualTo(Limit other)
-
isInfinite
public boolean isInfinite()
-
-