mirror of
https://github.com/ChronosX88/FreePastry.git
synced 2025-01-16 09:36:27 +00:00
548 lines
20 KiB
HTML
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> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Id.Distance.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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">
|
||
|
<A HREF="../../rice/pastry/Id.html" title="class in rice.pastry"><B>PREV CLASS</B></A>
|
||
|
<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>
|
||
|
<A HREF="Id.Distance.html" target="_top"><B>NO FRAMES</B></A>
|
||
|
<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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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<<A HREF="../../rice/p2p/commonapi/Id.Distance.html" title="interface in rice.p2p.commonapi">Id.Distance</A>>, <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>
|
||
|
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[] diff)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
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[] diff)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Constructor.</TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
|
||
|
<!-- ========== 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> void</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#blit(byte[])">blit</A></B>(byte[] target)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
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> void</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#blit(byte[], int)">blit</A></B>(byte[] target,
|
||
|
int offset)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
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> 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> obj)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Comparison operator.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> byte[]</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#copy()">copy</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
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> boolean</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object obj)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Equality operator.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#hashCode()">hashCode</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Hash codes.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <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 cnt,
|
||
|
int fill)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Shift operator.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <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 cnt,
|
||
|
int fill,
|
||
|
boolean roundUp)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Shift operator.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <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 cnt,
|
||
|
int fill)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Shift operator.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> java.lang.String</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../rice/pastry/Id.Distance.html#toString()">toString</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Returns a string representation of the distance The string is a byte string from most to
|
||
|
least significant.</TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
<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>
|
||
|
|
||
|
<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[] 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[] 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[] 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[] target,
|
||
|
int 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> 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<<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>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 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 cnt,
|
||
|
int 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 cnt,
|
||
|
int fill,
|
||
|
boolean 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 cnt,
|
||
|
int 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> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Id.Distance.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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">
|
||
|
<A HREF="../../rice/pastry/Id.html" title="class in rice.pastry"><B>PREV CLASS</B></A>
|
||
|
<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>
|
||
|
<A HREF="Id.Distance.html" target="_top"><B>NO FRAMES</B></A>
|
||
|
<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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
<A NAME="skip-navbar_bottom"></A>
|
||
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||
|
|
||
|
<HR>
|
||
|
<i>Copyright © 2001-2005 - Rice Pastry.</i>
|
||
|
</BODY>
|
||
|
</HTML>
|