📄 uuid.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><TITLE>UUID (Project JXTA J2SE)</TITLE><META NAME="keywords" CONTENT="net.jxta.impl.id.UUID.UUID class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="UUID (Project JXTA J2SE)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= 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=3 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/UUID.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><a href='http://www.jxta.org' target='_blank'>Project JXTA</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../net/jxta/impl/id/UUID/PipeID.html" title="class in net.jxta.impl.id.UUID"><B>PREV CLASS</B></A> <A HREF="../../../../../net/jxta/impl/id/UUID/UUIDFactory.html" title="class in net.jxta.impl.id.UUID"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="UUID.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 | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <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">net.jxta.impl.id.UUID</FONT><BR>Class UUID</H2><PRE>java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>net.jxta.impl.id.UUID.UUID</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD></DL><HR><DL><DT>public final class <B>UUID</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL><P>A <code>UUID</code> is a 128-bit universally unique identifier. The most significant long can be decomposed into the following unsigned fields: <pre> 0xFFFFFFFF00000000 time_low 0x00000000FFFF0000 time_mid 0x000000000000F000 version 0x0000000000000FFF time_hi </pre> <p/>The least significant long can be decomposed into the following unsigned fields: <pre> 0xC000000000000000 variant 0x3FFF000000000000 clock_seq 0x0000FFFFFFFFFFFF node </pre> <p/>The variant field must be 0x2. The version field must be either 0x1 or 0x4. <p/>If the version field is 0x4, then the most significant bit of the node field must be set to 1, and the remaining fields are set to values produced by a cryptographically strong pseudo-random number generator. <p/>If the version field is 0x1, then the node field is set to an IEEE 802 address (MAC), the clock_seq field is set to a 14-bit random number, and the time_low, time_mid, and time_hi fields are set to the least, middle and most significant bits (respectively) of a 60-bit timestamp measured in 100-nanosecond units since midnight, October 15, 1582 UTC.<P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../net/jxta/impl/id/UUID/IDFormat.html" title="class in net.jxta.impl.id.UUID"><CODE>IDFormat</CODE></A>, <A HREF="../../../../../net/jxta/impl/id/UUID/UUIDFactory.html" title="class in net.jxta.impl.id.UUID"><CODE>UUIDFactory</CODE></A>, "<i>Information Technology - Open Systems Interconnection - Remote Procedure Call (RPC)</i>, ISO 11578:1996", <a href="http://www.opengroup.org/onlinepubs/9629399/apdxa.htm" target="_blank"><i>The Open Group - DCE 1.1 Remote Procedure Call (RPC) : Appendix A - Universal Unique Identifier</i></a>, <A HREF="../../../../../serialized-form.html#net.jxta.impl.id.UUID.UUID">Serialized Form</A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../../../net/jxta/impl/id/UUID/UUID.html" title="class in net.jxta.impl.id.UUID">UUID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/UUID/UUID.html#nullUUID">nullUUID</A></B></CODE><BR> The null UUID. </TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/UUID/UUID.html#UUID(byte[])">UUID</A></B>(byte[] bytes)</CODE><BR> Simple constructor. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/UUID/UUID.html#UUID(long, long)">UUID</A></B>(long mostSig, long leastSig)</CODE><BR> Simple constructor. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/UUID/UUID.html#UUID(java.lang.String)">UUID</A></B>(java.lang.String uuid)</CODE><BR> </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"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></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="../../../../../net/jxta/impl/id/UUID/UUID.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object target)</CODE><BR> </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="../../../../../net/jxta/impl/id/UUID/UUID.html#equals(net.jxta.impl.id.UUID.UUID)">equals</A></B>(<A HREF="../../../../../net/jxta/impl/id/UUID/UUID.html" title="class in net.jxta.impl.id.UUID">UUID</A> sid)</CODE><BR> UUIDs are equal if they represent the same 128-bit value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/UUID/UUID.html#getLeastSignificantBits()">getLeastSignificantBits</A></B>()</CODE><BR> Returns the least significant 64 bits of the UUID.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/UUID/UUID.html#getMostSignificantBits()">getMostSignificantBits</A></B>()</CODE><BR> Returns the most significant 64 bits of the UUID.</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="../../../../../net/jxta/impl/id/UUID/UUID.html#hashCode()">hashCode</A></B>()</CODE><BR> </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="../../../../../net/jxta/impl/id/UUID/UUID.html#toString()">toString</A></B>()</CODE><BR> Returns a 36-character string of six fields separated by hyphens, with each field represented in lowercase hexadecimal with the same number of digits as in the field. </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">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -