public static class CirculantGraph.OffsetRange extends Object implements Serializable, Comparable<CirculantGraph.OffsetRange>
Constructor and Description |
---|
OffsetRange(long offset,
long length)
Construct a range with the given offset and length.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(CirculantGraph.OffsetRange o) |
long |
getLastOffset()
Get the offset of the last index in the range.
|
long |
getLength()
Get the range length.
|
long |
getOffset()
Get the range offset.
|
boolean |
overlaps(CirculantGraph.OffsetRange other)
Return true if and only if the other range and this range share a common offset ID.
|
String |
toString() |
public OffsetRange(long offset, long length)
offset
- the range offsetlength
- the range lengthpublic long getOffset()
public long getLength()
public long getLastOffset()
public boolean overlaps(CirculantGraph.OffsetRange other)
other
- other rangepublic int compareTo(CirculantGraph.OffsetRange o)
compareTo
in interface Comparable<CirculantGraph.OffsetRange>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.