org.limewire.collection
Class LongInterval
java.lang.Object
org.limewire.collection.Range
org.limewire.collection.LongInterval
- All Implemented Interfaces:
- Serializable
public class LongInterval
- extends Range
- implements Serializable
An implementation of range that stores data in longs
- See Also:
- Serialized Form
|
Method Summary |
long |
getHigh()
|
long |
getLow()
|
boolean |
isLong()
|
byte[] |
toBytes()
|
void |
toBytes(byte[] dest,
int offset)
places a byte[] representation of this range in the specified array at
the specified offset. |
LongInterval
protected LongInterval(long low,
long high)
LongInterval
protected LongInterval(long singleton)
getLow
public final long getLow()
- Specified by:
getLow in class Range
getHigh
public final long getHigh()
- Specified by:
getHigh in class Range
toBytes
public byte[] toBytes()
- Specified by:
toBytes in class Range
- Returns:
- a byte [] representation of this range. The representation will
be 8 bytes if isLong() is false, 10 bytes otherwise.
toBytes
public void toBytes(byte[] dest,
int offset)
- Description copied from class:
Range
- places a byte[] representation of this range in the specified array at
the specified offset.
- Specified by:
toBytes in class Range
isLong
public final boolean isLong()
- Specified by:
isLong in class Range
- Returns:
- true if this range has values > Integer.MAX_VALUE.
Copyright © 2009 Lime Wire LLC. All Rights Reserved.