Rice Pastry API

rice.p2p.commonapi
Interface IdRange

All Known Implementing Classes:
IdRange

public interface IdRange

Version:
$Id: IdRange.java,v 1.6 2003/06/11 17:24:48 amislove Exp $
Author:
Alan Mislove, Peter Druschel

Method Summary
 boolean containsId(Id key)
          test if a given key lies within this range
 Id getCCWId()
          get counterclockwise edge of range
 IdRange getComplementRange()
          get the complement of this range
 Id getCWId()
          get clockwise edge of 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

Rice Pastry API

Copyright © 2001 - Rice Pastry