Rice Pastry API

rice.p2p.commonapi
Interface IdRange

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
FragmentKeyRange, GCIdRange, IdRange, MultiringIdRange, VersionKeyRange

public interface IdRange
extends java.io.Serializable

Version:
$Id: IdRange.java,v 1.10 2005/03/11 00:58:02 jeffh Exp $
Author:
Alan Mislove, Peter Druschel

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 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
 

Method Detail

containsId

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

Parameters:
key - the key
Returns:
true if the key lies within this range, false otherwise

getCCWId

public Id getCCWId()
get counterclockwise edge of range

Returns:
the id at the counterclockwise edge of the range (inclusive)

getCWId

public Id getCWId()
get clockwise edge of range

Returns:
the id at the clockwise edge of the range (exclusive)

getComplementRange

public IdRange getComplementRange()
get the complement of this range

Returns:
This range's complement

mergeRange

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

Parameters:
range - DESCRIBE THE PARAMETER
Returns:
The merge

diffRange

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

Parameters:
range - DESCRIBE THE PARAMETER
Returns:
The merge

intersectRange

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

Parameters:
range - DESCRIBE THE PARAMETER
Returns:
The merge

isEmpty

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

Returns:
Whether or not this range is empty

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection