Rice Pastry API

rice.p2p.past.gc
Class GCIdRange

java.lang.Object
  extended byrice.p2p.past.gc.GCIdRange
All Implemented Interfaces:
IdRange, java.io.Serializable

public class GCIdRange
extends java.lang.Object
implements IdRange

Version:
$Id: GCIdRange.java 2693 2005-08-05 14:00:47Z jeffh $
Author:
Alan Mislove
See Also:
Serialized Form

Field Summary
protected  IdRange range
          The internal (normal) IdRange
 
Constructor Summary
GCIdRange(IdRange range)
          Constructor, which takes a normal IdRange
 
Method Summary
 boolean containsId(Id key)
          test if a given key lies within this range
 IdRange diffRange(IdRange range)
          diffs the given range with this range
 Id getCCWId()
          get counterclockwise edge of range
 IdRange getComplementRange()
          get the complement of this range
 Id getCWId()
          get clockwise edge of range
 IdRange getRange()
          Returns the internal range
 IdRange intersectRange(IdRange range)
          intersects the given range with this range
 boolean isEmpty()
          returns whether or not this range is empty
 IdRange mergeRange(IdRange range)
          merges the given range with this range
 java.lang.String toString()
          Returns a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

range

protected IdRange range
The internal (normal) IdRange

Constructor Detail

GCIdRange

public GCIdRange(IdRange range)
Constructor, which takes a normal IdRange

Parameters:
range - The normal range
Method Detail

getRange

public IdRange getRange()
Returns the internal range

Returns:
The internal range

getCCWId

public Id getCCWId()
get counterclockwise edge of range

Specified by:
getCCWId in interface IdRange
Returns:
the id at the counterclockwise edge of the range (inclusive)

getCWId

public Id getCWId()
get clockwise edge of range

Specified by:
getCWId in interface IdRange
Returns:
the id at the clockwise edge of the range (exclusive)

getComplementRange

public IdRange getComplementRange()
get the complement of this range

Specified by:
getComplementRange in interface IdRange
Returns:
This range's complement

isEmpty

public boolean isEmpty()
returns whether or not this range is empty

Specified by:
isEmpty in interface IdRange
Returns:
Whether or not this range is empty

containsId

public boolean containsId(Id key)
test if a given key lies within this range

Specified by:
containsId in interface IdRange
Parameters:
key - the key
Returns:
true if the key lies within this range, false otherwise

mergeRange

public IdRange mergeRange(IdRange range)
merges the given range with this range

Specified by:
mergeRange in interface IdRange
Parameters:
range - DESCRIBE THE PARAMETER
Returns:
The merge

diffRange

public IdRange diffRange(IdRange range)
diffs the given range with this range

Specified by:
diffRange in interface IdRange
Parameters:
range - DESCRIBE THE PARAMETER
Returns:
The merge

intersectRange

public IdRange intersectRange(IdRange range)
intersects the given range with this range

Specified by:
intersectRange in interface IdRange
Parameters:
range - DESCRIBE THE PARAMETER
Returns:
The merge

toString

public java.lang.String toString()
Returns a string

Returns:
THe string

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection