?? structcollection.html
字號:
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="StructCollection(structure.Structure)"><!-- --></A><H3>StructCollection</H3><PRE>public <B>StructCollection</B>(<A HREF="../structure/Structure.html">Structure</A> s)</PRE><DL><DD>Constructs a Collection, based on the contents of the subordinate Structure object.</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="add(java.lang.Object)"><!-- --></A><H3>add</H3><PRE>public boolean <B>add</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> o)</PRE><DL><DD>Add an object to the subordinate Structure, and return boolean indicating success.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#add(java.lang.Object)">add</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>the object o is added to the Structure, and true is returned<DT><B>Returns:</B><DD>true.</DL></DD></DL><HR><A NAME="addAll(java.util.Collection)"><!-- --></A><H3>addAll</H3><PRE>public boolean <B>addAll</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A> c)</PRE><DL><DD>Adds all the elements of another collection (c) into this Structure. A boolean value of true is returned.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#addAll(java.util.Collection)">addAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Precondition:</B><DD>c is a valid collection<DT><B>Postcondition:</B><DD>the elements of c have been added to the Structure, and the value true is returned if all adds returned true.<DT><B>Returns:</B><DD>true if each of the adds returned true.</DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>Remove all elements from the Structure.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#clear()">clear</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>the subordinate structure is empty</DL></DD></DL><HR><A NAME="contains(java.lang.Object)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> o)</PRE><DL><DD>Returns true iff object o is contained within the subordinate structure.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#contains(java.lang.Object)">contains</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Precondition:</B><DD>o is a non-null object<DT><B>Postcondition:</B><DD>returns true if o is equal to some object in the subordinate structure.</DL></DD></DL><HR><A NAME="containsAll(java.util.Collection)"><!-- --></A><H3>containsAll</H3><PRE>public boolean <B>containsAll</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A> c)</PRE><DL><DD>Returns true if all of the elements of c are contained within the subordinate structure.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#containsAll(java.util.Collection)">containsAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Precondition:</B><DD>c is a valid Collection<DT><B>Postcondition:</B><DD>returns true if all elements of c appear in this Structure<DT><B>Returns:</B><DD>true if c is a subset of this</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> o)</PRE><DL><DD>Compare one StructCollection with another.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#equals(java.lang.Object)">equals</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Precondition:</B><DD>o is of similar type to base Structure<DT><B>Postcondition:</B><DD>returns true if both objects appear equal as Structures<DT><B>Returns:</B><DD>true iff Structures are equals</DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Return hash code.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#hashCode()">hashCode</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()">hashCode</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>hash code returned is the hashcode of the subordinate structure.<DT><B>Returns:</B><DD>hash code of subordinate structure.</DL></DD></DL><HR><A NAME="isEmpty()"><!-- --></A><H3>isEmpty</H3><PRE>public boolean <B>isEmpty</B>()</PRE><DL><DD>Detect an empty structure.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#isEmpty()">isEmpty</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>returns true iff subordinate structure is empty<DT><B>Returns:</B><DD>true iff subordinate structure is empty.</DL></DD></DL><HR><A NAME="iterator()"><!-- --></A><H3>iterator</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Iterator.html">Iterator</A> <B>iterator</B>()</PRE><DL><DD>Return an iterator to traverse the subordinate structure.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#iterator()">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>returns an iterator over subordinate strucutre<DT><B>Returns:</B><DD>the iterator over the subordinate structure.</DL></DD></DL><HR><A NAME="remove(java.lang.Object)"><!-- --></A><H3>remove</H3><PRE>public boolean <B>remove</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> o)</PRE><DL><DD>Removes an instance of object o, if it appears within structure.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#remove(java.lang.Object)">remove</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Precondition:</B><DD>o is non-null<DT><B>Postcondition:</B><DD>removes up to one instance of o from structure<DT><B>Returns:</B><DD>returns true if instance was found and removed.</DL></DD></DL><HR><A NAME="removeAll(java.util.Collection)"><!-- --></A><H3>removeAll</H3><PRE>public boolean <B>removeAll</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A> c)</PRE><DL><DD>Removes all objects found within collection c from this collection.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#removeAll(java.util.Collection)">removeAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Precondition:</B><DD>c is a valid collection<DT><B>Postcondition:</B><DD>a copy of each element c is removed from this, if it exists<DT><B>Returns:</B><DD>true if every element of c could be removed from this.</DL></DD></DL><HR><A NAME="retainAll(java.util.Collection)"><!-- --></A><H3>retainAll</H3><PRE>public boolean <B>retainAll</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A> c)</PRE><DL><DD>Retains elements of this Collection that are also in c.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#retainAll(java.util.Collection)">retainAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Precondition:</B><DD>c is a valid Collection<DT><B>Postcondition:</B><DD>this collection retains only those elements found within both this and c.<DT><B>Returns:</B><DD>true iff this Collection was changed by this operation</DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Determine the number of elements in this collection.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#size()">size</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>returns the number of elements in this collection<DT><B>Returns:</B><DD>the number of elements in this collection.</DL></DD></DL><HR><A NAME="toArray()"><!-- --></A><H3>toArray</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A>[] <B>toArray</B>()</PRE><DL><DD>Construct an array of values found in the subordinate Structure.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#toArray()">toArray</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>returns an array of objects containing the values of structure<DT><B>Returns:</B><DD>array containing exactly the elements of this structure</DL></DD></DL><HR><A NAME="toArray(java.lang.Object[])"><!-- --></A><H3>toArray</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A>[] <B>toArray</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A>[] target)</PRE><DL><DD>Copy elements of this structure into target array.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html#toArray(java.lang.Object[])">toArray</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Precondition:</B><DD>target is valid<DT><B>Postcondition:</B><DD>values are copied to target; target is enlarged if necessary to contain the values of this collection; ultimate target is returned.<DT><B>Returns:</B><DD>the array of values</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> <B>toString</B>()</PRE><DL><DD>Construct a string representation of this class.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Precondition:</B><DD>base class can stringify itself<DT><B>Postcondition:</B><DD>string representation of this class is returned<DT><B>Returns:</B><DD>string representing this class</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <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><a href=../copyright.html target=_top>© 1998-2002 McGraw-Hill</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../structure/StackVector.html"><B>PREV CLASS</B></A> <A HREF="../structure/Table.html"><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="StructCollection.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <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><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -