public class ByteArrayRange extends Object implements Comparable<ByteArrayRange>
Modifier and Type | Class and Description |
---|---|
static class |
ByteArrayRange.MergeOperation |
Modifier and Type | Field and Description |
---|---|
protected byte[] |
end |
protected boolean |
singleValue |
protected byte[] |
start |
Constructor and Description |
---|
ByteArrayRange(byte[] start,
byte[] end)
*
|
ByteArrayRange(byte[] start,
byte[] end,
boolean singleValue)
*
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ByteArrayRange other) |
boolean |
equals(Object obj) |
byte[] |
getEnd() |
byte[] |
getEndAsNextPrefix() |
byte[] |
getStart() |
byte[] |
getStartAsPreviousPrefix() |
int |
hashCode() |
ByteArrayRange |
intersection(ByteArrayRange other) |
boolean |
intersects(ByteArrayRange other) |
boolean |
isSingleValue() |
static Collection<ByteArrayRange> |
mergeIntersections(Collection<ByteArrayRange> ranges,
ByteArrayRange.MergeOperation op) |
ByteArrayRange |
union(ByteArrayRange other) |
protected byte[] start
protected byte[] end
protected boolean singleValue
public ByteArrayRange(byte[] start, byte[] end)
start
- start of unit intervalend
- end of unit intervalpublic ByteArrayRange(byte[] start, byte[] end, boolean singleValue)
start
- start of unit intervalend
- end of unit intervalpublic byte[] getStart()
public byte[] getEnd()
public byte[] getStartAsPreviousPrefix()
public byte[] getEndAsNextPrefix()
public boolean isSingleValue()
public boolean intersects(ByteArrayRange other)
public ByteArrayRange intersection(ByteArrayRange other)
public ByteArrayRange union(ByteArrayRange other)
public int compareTo(ByteArrayRange other)
compareTo
in interface Comparable<ByteArrayRange>
public static final Collection<ByteArrayRange> mergeIntersections(Collection<ByteArrayRange> ranges, ByteArrayRange.MergeOperation op)
Copyright © 2013–2022. All rights reserved.