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.commonapi
Interface Id.Distance

All Superinterfaces:
  java.lang.Comparable, java.io.Serializable

All Known Implementing Classes:
  Id.Distance

Enclosing interface:
  Id

    public static interface Id.Distance

extends java.lang.Comparable, java.io.Serializable

A class for representing and manipulating the distance between two Ids on the circle.

Version:
  $Id: Id.java 3613 2007-02-15 14:45:14Z jstewart $
Author:
  amislove

Method Summary
`Id.Distance` | `shiftDistance(int cnt, int fill)` Shift operator.

Methods inherited from interface java.lang.Comparable
`compareTo`

Method Detail

### shiftDistance

    Id.Distance shiftDistance(int cnt,
                              int fill)

  Shift operator. shift(-1,0) multiplies value of this by two, shift(1,0) divides by 2

  Parameters:
    `cnt` - the number of bits to shift, negative shifts left, positive shifts right
    `fill` - value of bit shifted in (0 if fill == 0, 1 otherwise)
  Returns:
    this

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.