?? catalog.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.4.2_02) on Wed Jun 09 11:15:35 EDT 2004 -->
<TITLE>
Catalog
</TITLE>
<META NAME="keywords" CONTENT="Catalog class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Catalog";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
Class Catalog</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="./resources/inherit.gif" ALT="extended by"><B>Catalog</B>
</PRE>
<HR>
<DL>
<DT>public class <B>Catalog</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL>
<P>
This class models a product catalog. It contains a collection of <A HREF="Product.html" title="class in "><CODE>Product</CODE></A> objects.
<P>
<P>
<DL>
<DT><B>Version:</B></DT> <DD>1.0.0</DD><DT><B>Author:</B></DT> <DD>author name</DD><DT><B>See Also:</B><DD><A HREF="Product.html" title="class in "><CODE>Product</CODE></A></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== 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="Catalog.html#Catalog()">Catalog</A></B>()</CODE>
<BR>
Constructs an empty catalog.</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> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Catalog.html#addProduct(Product)">addProduct</A></B>(<A HREF="Product.html" title="class in ">Product</A> product)</CODE>
<BR>
Adds a <A HREF="Product.html" title="class in "><CODE>Product</CODE></A> object to this catalog.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="Catalog.html#getCodes()">getCodes</A></B>()</CODE>
<BR>
Returns an array containing all the codes products in this catalog.</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="Catalog.html#getNumberOfProducts()">getNumberOfProducts</A></B>()</CODE>
<BR>
Returns the number of products in this catalog.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="Product.html" title="class in ">Product</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="Catalog.html#getProduct(java.lang.String)">getProduct</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> code)</CODE>
<BR>
Returns the <A HREF="Product.html" title="class in "><CODE>Product</CODE></A> object with the specified <code>code</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="Catalog.html#getProductsIterator()">getProductsIterator</A></B>()</CODE>
<BR>
Returns an iterator over the products in this catalog.</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">
<TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= 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="Catalog()"><!-- --></A><H3>
Catalog</H3>
<PRE>
public <B>Catalog</B>()</PRE>
<DL>
<DD>Constructs an empty catalog.
<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="addProduct(Product)"><!-- --></A><H3>
addProduct</H3>
<PRE>
public void <B>addProduct</B>(<A HREF="Product.html" title="class in ">Product</A> product)</PRE>
<DL>
<DD>Adds a <A HREF="Product.html" title="class in "><CODE>Product</CODE></A> object to this catalog.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>product</CODE> - the product to be added.</DL>
</DD>
</DL>
<HR>
<A NAME="getProductsIterator()"><!-- --></A><H3>
getProductsIterator</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>getProductsIterator</B>()</PRE>
<DL>
<DD>Returns an iterator over the products in this catalog. return an <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Iterator.html" title="class or interface in java.util"><CODE>Iterator</CODE></A>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getProduct(java.lang.String)"><!-- --></A><H3>
getProduct</H3>
<PRE>
public <A HREF="Product.html" title="class in ">Product</A> <B>getProduct</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> code)</PRE>
<DL>
<DD>Returns the <A HREF="Product.html" title="class in "><CODE>Product</CODE></A> object with the specified <code>code</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>code</CODE> - a product code.<DT><B>Returns:</B><DD>The <A HREF="Product.html" title="class in "><CODE>Product</CODE></A> object with the specifed code. Returns <code>null</code> if there are no products in this catalog with the specifed code.</DL>
</DD>
</DL>
<HR>
<A NAME="getNumberOfProducts()"><!-- --></A><H3>
getNumberOfProducts</H3>
<PRE>
public int <B>getNumberOfProducts</B>()</PRE>
<DL>
<DD>Returns the number of products in this catalog.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the number of <A HREF="Product.html" title="class in "><CODE>Product</CODE></A> objects in this catalog</DL>
</DD>
</DL>
<HR>
<A NAME="getCodes()"><!-- --></A><H3>
getCodes</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getCodes</B>()</PRE>
<DL>
<DD>Returns an array containing all the codes products in this catalog.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>an array containing the code products of this catalog</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<HR>
</BODY>
</HTML>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -