ePOST 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 2302 2005-03-11 00:58:26Z jeffh $
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

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

Id getCCWId()
get counterclockwise edge of range

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

getCWId

Id getCWId()
get clockwise edge of range

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

getComplementRange

IdRange getComplementRange()
get the complement of this range

Returns:
This range's complement

mergeRange

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

Returns:
The merge

diffRange

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

Returns:
The merge

intersectRange

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

Returns:
The merge

isEmpty

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

Returns:
Whether or not this range is empty

ePOST API

Copyright © 2001-2005 - Rice Pastry.