public class TimeRange extends Object
构造器和说明 |
---|
TimeRange()
默认构造函数。
|
TimeRange(long start)
构造一个时间戳区间为[start, Long.MAX_VALUE)。
|
TimeRange(long start,
long end)
构造一个时间戳区间为[start, end)。
|
public TimeRange()
public TimeRange(long start)
start
- 起始时间戳(inclusive)public TimeRange(long start, long end)
start
- 起始时间戳(inclusive)end
- 最大时间戳(exclusive)public long getStart()
public long getEnd()
public boolean withinTimeRange(long timestamp)
timestamp
- 时间戳public int compare(long timestamp)
timestamp
- 时间戳public boolean containsOnlyOneVersion()
Copyright © 2019. All Rights Reserved.