LimeWire collection component api

org.limewire.collection
Class LongInterval

java.lang.Object
  extended by org.limewire.collection.Range
      extended by 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

Field Summary
 
Fields inherited from class org.limewire.collection.Range
MAX_VALUE
 
Constructor Summary
protected LongInterval(long singleton)
           
protected LongInterval(long low, long high)
           
 
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.
 
Methods inherited from class org.limewire.collection.Range
createRange, createRange, equals, getLength, hashCode, isSubrange, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LongInterval

protected LongInterval(long low,
                       long high)

LongInterval

protected LongInterval(long singleton)
Method Detail

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.

LimeWire collection component api

Copyright © 2009 Lime Wire LLC. All Rights Reserved.