Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.p2p.glacier
Class FragmentKeyRange

    java.lang.Object
      rice.p2p.glacier.FragmentKeyRange

All Implemented Interfaces:
  java.io.Serializable, IdRange

    public class FragmentKeyRange

extends java.lang.Object
implements IdRange

DESCRIBE THE CLASS

Version:
  $Id: FragmentKeyRange.java 3274 2006-05-15 16:17: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
`void` | `FragmentKeyRange(InputBuffer buf, Endpoint endpoint)` DESCRIBE THE METHOD
`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
`void` | `serialize(OutputBuffer buf)` DESCRIBE THE METHOD
`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

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `o` - DESCRIBE THE PARAMETER
  Returns:
    Equals

### hashCode

    public int hashCode()

  Returns the hashCode

  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    hashCode

### toString

    public java.lang.String toString()

  Prints out the string

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    A string

### FragmentKeyRange

    public void FragmentKeyRange(InputBuffer buf,
                                 Endpoint endpoint)
                          throws java.io.IOException

  DESCRIBE THE METHOD

  Parameters:
    `buf` - DESCRIBE THE PARAMETER
    `endpoint` - DESCRIBE THE PARAMETER
  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### serialize

    public void serialize(OutputBuffer buf)
                   throws java.io.IOException

  DESCRIBE THE METHOD

  Specified by:
    `serialize` in interface `IdRange`
  Parameters:
    `buf` - DESCRIBE THE PARAMETER
  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.