FreePastry/docs/javadoc/rice/pastry/Id.Distance.html
ChronosX88 aaa73fe8b3 Pew
2019-05-13 16:45:05 +04:00

548 lines
20 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_07) on Fri Mar 13 20:01:13 CET 2009 -->
<TITLE>
Id.Distance (Rice Pastry - API Specifications)
</TITLE>
<META NAME="date" CONTENT="2009-03-13">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Id.Distance (Rice Pastry - API Specifications)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Id.Distance.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Rice Pastry API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../rice/pastry/Id.html" title="class in rice.pastry"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../rice/pastry/IdRange.html" title="class in rice.pastry"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?rice/pastry/Id.Distance.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Id.Distance.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
rice.pastry</FONT>
<BR>
Class Id.Distance</H2>
<PRE>
java.lang.Object
<IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>rice.pastry.Id.Distance</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Comparable&lt;<A HREF="../../rice/p2p/commonapi/Id.Distance.html" title="interface in rice.p2p.commonapi">Id.Distance</A>&gt;, <A HREF="../../rice/p2p/commonapi/Id.Distance.html" title="interface in rice.p2p.commonapi">Id.Distance</A></DD>
</DL>
<DL>
<DT><B>Enclosing class:</B><DD><A HREF="../../rice/pastry/Id.html" title="class in rice.pastry">Id</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public static class <B>Id.Distance</B><DT>extends java.lang.Object<DT>implements <A HREF="../../rice/p2p/commonapi/Id.Distance.html" title="interface in rice.p2p.commonapi">Id.Distance</A></DL>
</PRE>
<P>
A class for representing and manipulating the distance between two Ids on the circle.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Id: Id.java 4654 2009-01-08 16:33:07Z jeffh $</DD>
<DT><B>Author:</B></DT>
<DD>amislove</DD>
<DT><B>See Also:</B><DD><A HREF="../../serialized-form.html#rice.pastry.Id.Distance">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#Id.Distance()">Id.Distance</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#Id.Distance(byte[])">Id.Distance</A></B>(byte[]&nbsp;diff)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#Id.Distance(int[])">Id.Distance</A></B>(int[]&nbsp;diff)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#blit(byte[])">blit</A></B>(byte[]&nbsp;target)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Blits the distance into a target array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#blit(byte[], int)">blit</A></B>(byte[]&nbsp;target,
int&nbsp;offset)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Blits the distance into a target array, starting at the given offset.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#compareTo(rice.p2p.commonapi.Id.Distance)">compareTo</A></B>(<A HREF="../../rice/p2p/commonapi/Id.Distance.html" title="interface in rice.p2p.commonapi">Id.Distance</A>&nbsp;obj)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Comparison operator.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#copy()">copy</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy the distance into a freshly generated array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object&nbsp;obj)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equality operator.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#hashCode()">hashCode</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hash codes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../rice/pastry/Id.Distance.html" title="class in rice.pastry">Id.Distance</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#shift(int, int)">shift</A></B>(int&nbsp;cnt,
int&nbsp;fill)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Shift operator.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../rice/pastry/Id.Distance.html" title="class in rice.pastry">Id.Distance</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#shift(int, int, boolean)">shift</A></B>(int&nbsp;cnt,
int&nbsp;fill,
boolean&nbsp;roundUp)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Shift operator.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../rice/p2p/commonapi/Id.Distance.html" title="interface in rice.p2p.commonapi">Id.Distance</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#shiftDistance(int, int)">shiftDistance</A></B>(int&nbsp;cnt,
int&nbsp;fill)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Shift operator.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#toString()">toString</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a string representation of the distance The string is a byte string from most to
least significant.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Id.Distance()"><!-- --></A><H3>
Id.Distance</H3>
<PRE>
public <B>Id.Distance</B>()</PRE>
<DL>
<DD>Constructor.
<P>
</DL>
<HR>
<A NAME="Id.Distance(byte[])"><!-- --></A><H3>
Id.Distance</H3>
<PRE>
public <B>Id.Distance</B>(byte[]&nbsp;diff)</PRE>
<DL>
<DD>Constructor.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>diff</CODE> - The different, as a byte array</DL>
</DL>
<HR>
<A NAME="Id.Distance(int[])"><!-- --></A><H3>
Id.Distance</H3>
<PRE>
public <B>Id.Distance</B>(int[]&nbsp;diff)</PRE>
<DL>
<DD>Constructor.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>diff</CODE> - The difference, as an int array</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="blit(byte[])"><!-- --></A><H3>
blit</H3>
<PRE>
public void <B>blit</B>(byte[]&nbsp;target)</PRE>
<DL>
<DD>Blits the distance into a target array.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>target</CODE> - an array of length at least IdBitLength/8 for the distance to be stored in.</DL>
</DD>
</DL>
<HR>
<A NAME="blit(byte[], int)"><!-- --></A><H3>
blit</H3>
<PRE>
public void <B>blit</B>(byte[]&nbsp;target,
int&nbsp;offset)</PRE>
<DL>
<DD>Blits the distance into a target array, starting at the given offset.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - The offset to start at<DD><CODE>target</CODE> - an array of length at least IdBitLength/8 for the distance to be stored in.</DL>
</DD>
</DL>
<HR>
<A NAME="copy()"><!-- --></A><H3>
copy</H3>
<PRE>
public byte[] <B>copy</B>()</PRE>
<DL>
<DD>Copy the distance into a freshly generated array.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a fresh copy of the distance material</DL>
</DD>
</DL>
<HR>
<A NAME="compareTo(rice.p2p.commonapi.Id.Distance)"><!-- --></A><H3>
compareTo</H3>
<PRE>
public int <B>compareTo</B>(<A HREF="../../rice/p2p/commonapi/Id.Distance.html" title="interface in rice.p2p.commonapi">Id.Distance</A>&nbsp;obj)</PRE>
<DL>
<DD>Comparison operator. The comparison that occurs is an absolute magnitude comparison.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>compareTo</CODE> in interface <CODE>java.lang.Comparable&lt;<A HREF="../../rice/p2p/commonapi/Id.Distance.html" title="interface in rice.p2p.commonapi">Id.Distance</A>&gt;</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the Distance to compare with.
<DT><B>Returns:</B><DD>negative if this < obj, 0 if they are equal and positive if this > obj.</DL>
</DD>
</DL>
<HR>
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(java.lang.Object&nbsp;obj)</PRE>
<DL>
<DD>Equality operator.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - another Distance.
<DT><B>Returns:</B><DD>true if they are the same, false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="shift(int, int)"><!-- --></A><H3>
shift</H3>
<PRE>
public <A HREF="../../rice/pastry/Id.Distance.html" title="class in rice.pastry">Id.Distance</A> <B>shift</B>(int&nbsp;cnt,
int&nbsp;fill)</PRE>
<DL>
<DD>Shift operator. shift(-1,0) multiplies value of this by two, shift(1,0) divides by 2
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cnt</CODE> - the number of bits to shift, negative shifts left, positive shifts right<DD><CODE>fill</CODE> - value of bit shifted in (0 if fill == 0, 1 otherwise)
<DT><B>Returns:</B><DD>this</DL>
</DD>
</DL>
<HR>
<A NAME="shift(int, int, boolean)"><!-- --></A><H3>
shift</H3>
<PRE>
public <A HREF="../../rice/pastry/Id.Distance.html" title="class in rice.pastry">Id.Distance</A> <B>shift</B>(int&nbsp;cnt,
int&nbsp;fill,
boolean&nbsp;roundUp)</PRE>
<DL>
<DD>Shift operator. shift(-1,0) multiplies value of this by two, shift(1,0) divides by 2
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cnt</CODE> - the number of bits to shift, negative shifts left, positive shifts right<DD><CODE>fill</CODE> - value of bit shifted in (0 if fill == 0, 1 otherwise)<DD><CODE>roundUp</CODE> - if true, round up the results after right shifting
<DT><B>Returns:</B><DD>this</DL>
</DD>
</DL>
<HR>
<A NAME="hashCode()"><!-- --></A><H3>
hashCode</H3>
<PRE>
public int <B>hashCode</B>()</PRE>
<DL>
<DD>Hash codes.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>hashCode</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a hash code.</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Returns a string representation of the distance The string is a byte string from most to
least significant.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The string representation of this distance</DL>
</DD>
</DL>
<HR>
<A NAME="shiftDistance(int, int)"><!-- --></A><H3>
shiftDistance</H3>
<PRE>
public <A HREF="../../rice/p2p/commonapi/Id.Distance.html" title="interface in rice.p2p.commonapi">Id.Distance</A> <B>shiftDistance</B>(int&nbsp;cnt,
int&nbsp;fill)</PRE>
<DL>
<DD>Shift operator. shift(-1,0) multiplies value of this by two, shift(1,0) divides by 2
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../rice/p2p/commonapi/Id.Distance.html#shiftDistance(int, int)">shiftDistance</A></CODE> in interface <CODE><A HREF="../../rice/p2p/commonapi/Id.Distance.html" title="interface in rice.p2p.commonapi">Id.Distance</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cnt</CODE> - the number of bits to shift, negative shifts left, positive shifts right<DD><CODE>fill</CODE> - value of bit shifted in (0 if fill == 0, 1 otherwise)
<DT><B>Returns:</B><DD>this</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Id.Distance.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Rice Pastry API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../rice/pastry/Id.html" title="class in rice.pastry"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../rice/pastry/IdRange.html" title="class in rice.pastry"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?rice/pastry/Id.Distance.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Id.Distance.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright &#169; 2001-2005 - Rice Pastry.</i>
</BODY>
</HTML>