📄 element.html
字号:
<DL></DL></DL><HR><A NAME="properties"><!-- --></A><H3>properties</H3><PRE>protected <A HREF="../util/SimpleHashtable.html" title="class in util">SimpleHashtable</A> <B>properties</B></PRE><DL><DD>A hashtable to store property to value mappings.<P><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Element()"><!-- --></A><H3>Element</H3><PRE>public <B>Element</B>()</PRE><DL><DD>Constructs a new element with an unique ID and without any attached properties.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(java.lang.Object o)</PRE><DL><DD>Compares this element to the specified object. The result is <code>true</code> if and only if the object <code>o<code> is not <code>null</code> and is also an element with the same id.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o</CODE> - the object to compare to.<DT><B>Returns:</B><DD><code>true</code> if the specified object is not <code>null</code> and is also an element with the same id.<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>o</code> is <code>null</code>.</DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Returns a hash code for this <code>element</code> based on its id.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a hash code value for this <code>element</code>, equal to its <code>ID</code>s hash code.</DL></DD></DL><HR><A NAME="setProperty(graph.Property, java.lang.Object)"><!-- --></A><H3>setProperty</H3><PRE>public java.lang.Object <B>setProperty</B>(<A HREF="../graph/Property.html" title="class in graph">Property</A> property, java.lang.Object value)</PRE><DL><DD>Attaches a <code>property</code> to <code>value</code> mapping to this element. The property can not be <code>null<code>. <p> Use the <code>getProperty</code> method with an equal key to retrieve the mapped value again.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>property</CODE> - the property.<DD><CODE>value</CODE> - the belonging value.<DT><B>Returns:</B><DD>the previous value of the specified property or <code>null</code> if the property was not attached before.<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if property is <code>null<code>.<DT><B>See Also:</B><DD><A HREF="../graph/Element.html#getProperty(graph.Property)"><CODE>getProperty(Property)</CODE></A></DL></DD></DL><HR><A NAME="getProperty(graph.Property)"><!-- --></A><H3>getProperty</H3><PRE>public java.lang.Object <B>getProperty</B>(<A HREF="../graph/Property.html" title="class in graph">Property</A> property)</PRE><DL><DD>Retrives the value the attached property is mapped to.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>property</CODE> - an attached property.<DT><B>Returns:</B><DD>the value to which the property is mapped or <code>null</code> if the property is not attached to this element.<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if property is <code>null<code>.<DT><B>See Also:</B><DD><CODE>#setProperty(Property)</CODE></DL></DD></DL><HR><A NAME="hasProperty(graph.Property)"><!-- --></A><H3>hasProperty</H3><PRE>public boolean <B>hasProperty</B>(<A HREF="../graph/Property.html" title="class in graph">Property</A> property)</PRE><DL><DD>Tests whether the element has a value mapped by that property.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>property</CODE> - the property.<DT><B>Returns:</B><DD>true if a value is attached for this property.</DL></DD></DL><HR><A NAME="removeProperty(graph.Property)"><!-- --></A><H3>removeProperty</H3><PRE>public java.lang.Object <B>removeProperty</B>(<A HREF="../graph/Property.html" title="class in graph">Property</A> property)</PRE><DL><DD>Removes the property (and its corresponding value) from this element. This method does nothing if the property is not attached to this element.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>property</CODE> - an attached property.<DT><B>Returns:</B><DD>the value to which the property was mapped or <code>null</code> if the property is not attached to this element.<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if property is <code>null<code>.</DL></DD></DL><HR><A NAME="compareTo(java.lang.Object)"><!-- --></A><H3>compareTo</H3><PRE>public int <B>compareTo</B>(java.lang.Object o)</PRE><DL><DD>Compares this <code>Element</code> object to another object. The elements ordering is inherited from its ids.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>compareTo</CODE> in interface <CODE>java.lang.Comparable</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o</CODE> - the object to compare to.<DT><B>Returns:</B><DD><code>0</code> if both elements are equal, a value less than <code>0</code> if this element is less than the argument and a value greater than <code>0</code> if this element is greater than the argument.<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if the argument is <code>null</code>.<DD><CODE>java.lang.ClassCastException</CODE> - if the argument is not an <code>Element</code>.</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=3 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="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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../graph/Edge.html" title="class in graph"><B>PREV CLASS</B></A> <A HREF="../graph/Graph.html" title="class in graph"><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="Element.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_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -