java.lang.Object
io.lettuce.core.Limit
public class Limit extends Object
Value object for a slice of data (offset/count).
- Since:
- 4.2
- Author:
- Mark Paluch
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Limit
-
-
Method Details
-
unlimited
- Returns:
- an unlimited limit.
-
create
- Parameters:
offset- the offset.count- the limit count.- Returns:
- the
Limit
-
from
Creates aLimitgivencount.- Parameters:
count- the limit count.- Returns:
- the
Limit. - Since:
- 4.5
-
getOffset
public long getOffset()- Returns:
- the offset or -1 if unlimited.
-
getCount
public long getCount()- Returns:
- the count or -1 if unlimited.
-
isLimited
public boolean isLimited()- Returns:
trueif theLimitcontains a limitation.
-
toString
-