Rice Pastry API

rice.p2p.glacier
Class FragmentKeyRange

java.lang.Object
  extended byrice.p2p.glacier.FragmentKeyRange
All Implemented Interfaces:
IdRange, java.io.Serializable

public class FragmentKeyRange
extends java.lang.Object
implements IdRange

DESCRIBE THE CLASS

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

Field Summary
protected  IdRange range
          The actual IdRange
 
Constructor Summary
protected FragmentKeyRange(IdRange range)
          Constructor
 
Method Summary
 boolean containsId(Id key)
          test if a given key lies within this range
 IdRange diffRange(IdRange diff)
          diffs the given range with this range
 boolean equals(java.lang.Object o)
          Determines equality
 Id getCCWId()
          get counterclockwise edge of range
 IdRange getComplementRange()
          get the complement of this range
 Id getCWId()
          get clockwise edge of range
 int hashCode()
          Returns the hashCode
 IdRange intersectRange(IdRange intersect)
          intersects the given range with this range
 boolean isEmpty()
          returns whether or not this range is empty
 IdRange mergeRange(IdRange merge)
          merges the given range with this range
 java.lang.String toString()
          Prints out the string
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

range

protected IdRange range
The actual IdRange

Constructor Detail

FragmentKeyRange

protected FragmentKeyRange(IdRange range)
Constructor

Parameters:
range - DESCRIBE THE PARAMETER
Method Detail

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 merge)
merges the given range with this range

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

diffRange

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

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

intersectRange

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

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

equals

public boolean equals(java.lang.Object o)
Determines equality

Parameters:
o - DESCRIBE THE PARAMETER
Returns:
Equals

hashCode

public int hashCode()
Returns the hashCode

Returns:
hashCode

toString

public java.lang.String toString()
Prints out the string

Returns:
A string

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection