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 VersionKeyRange

    java.lang.Object
      rice.p2p.glacier.VersionKeyRange

All Implemented Interfaces:
  java.io.Serializable, IdRange

    public class VersionKeyRange

extends java.lang.Object
implements IdRange

DESCRIBE THE CLASS

Version:
  $Id: VersionKeyRange.java 3613 2007-02-15 14:45:14Z jstewart $
Author:
  ahae
See Also:
  Serialized Form

Field Summary
`protected IdRange` | `range` The actual IdRange

Constructor Summary
`protected` | `VersionKeyRange(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
`void` | `serialize(OutputBuffer buf)`
`java.lang.String` | `toString()` Prints out the string
`void` | `VersionKeyRange(InputBuffer buf, Endpoint endpoint)`

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

### VersionKeyRange

    protected VersionKeyRange(IdRange range)

  Constructor

  Parameters:
    `ringId` - DESCRIBE THE PARAMETER
    `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

### VersionKeyRange

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

  Throws:
    `java.io.IOException`

### serialize

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

  Specified by:
    `serialize` in interface `IdRange`
  Throws:
    `java.io.IOException`

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.