?? coffeebrewer.html
字號(hào):
<!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.5.0_06) on Tue Dec 20 15:01:52 EST 2005 -->
<TITLE>
CoffeeBrewer
</TITLE>
<META NAME="keywords" CONTENT="CoffeeBrewer class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="CoffeeBrewer";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
Class CoffeeBrewer</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.5/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 "><A HREF="Product.html" title="class in <Unnamed>">Product</A>
<IMG SRC="./resources/inherit.gif" ALT="extended by "><B>CoffeeBrewer</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>CoffeeBrewer</B><DT>extends <A HREF="Product.html" title="class in <Unnamed>">Product</A></DL>
</PRE>
<P>
This class models a coffee brewer. It extends <A HREF="Product.html" title="class in <Unnamed>"><CODE>Product</CODE></A> and adds the following information: <ol> <li>the model of the coffee brewer, a <code>String</code></li> <li>the water supply ("Pour-over" or "Automatic")</li> <li>the capacity expressed in number of cups, a <code>int</code></li> </ol>
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>1.0.0</DD>
<DT><B>Author:</B></DT>
<DD>iCarnegie</DD>
<DT><B>See Also:</B><DD><A HREF="Product.html" title="class in <Unnamed>"><CODE>Product</CODE></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="CoffeeBrewer.html#CoffeeBrewer(java.lang.String, java.lang.String, double, java.lang.String, java.lang.String, int)">CoffeeBrewer</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> initialCode,
<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> initialDescription,
double initialPrice,
<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> initialModel,
<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> initialWaterSupply,
int initialNumberOfCups)</CODE>
<BR>
Constructs a <code>CoffeeBrewer</code> object.</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> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/ArrayList.html" title="class or interface in java.util">ArrayList</A><<A HREF="DataField.html" title="class in <Unnamed>">DataField</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="CoffeeBrewer.html#getDataFields()">getDataFields</A></B>()</CODE>
<BR>
Obtains an <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/ArrayList.html" title="class or interface in java.util"><CODE>ArrayList</CODE></A> of <A HREF="DataField.html" title="class in <Unnamed>"><CODE>DataField</CODE></A> with the names and values for each attribute of this product.</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.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="CoffeeBrewer.html#getModel()">getModel</A></B>()</CODE>
<BR>
Returns the model of this coffee brewer.</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="CoffeeBrewer.html#getNumberOfCups()">getNumberOfCups</A></B>()</CODE>
<BR>
Returns the capacity of this coffee brewer expressed in number of cups.</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.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="CoffeeBrewer.html#getWaterSupply()">getWaterSupply</A></B>()</CODE>
<BR>
Returns the type of water supply.</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.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="CoffeeBrewer.html#toString()">toString</A></B>()</CODE>
<BR>
Returns the string representation of this coffee brewer.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_Product"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class <A HREF="Product.html" title="class in <Unnamed>">Product</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="Product.html#equals(java.lang.Object)">equals</A>, <A HREF="Product.html#getCode()">getCode</A>, <A HREF="Product.html#getDescription()">getDescription</A>, <A HREF="Product.html#getPrice()">getPrice</A></CODE></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.<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/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.5/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></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="CoffeeBrewer(java.lang.String, java.lang.String, double, java.lang.String, java.lang.String, int)"><!-- --></A><H3>
CoffeeBrewer</H3>
<PRE>
public <B>CoffeeBrewer</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> initialCode,
<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> initialDescription,
double initialPrice,
<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> initialModel,
<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> initialWaterSupply,
int initialNumberOfCups)</PRE>
<DL>
<DD>Constructs a <code>CoffeeBrewer</code> object.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>initialCode</CODE> - the code of the product.<DD><CODE>initialDescription</CODE> - a short description of the product.<DD><CODE>initialPrice</CODE> - the price of the product.<DD><CODE>initialModel</CODE> - the model of the coffee brewer.<DD><CODE>initialWaterSupply</CODE> - the water supply is ("Pour-over" or "Automatic").<DD><CODE>initialNumberOfCups</CODE> - the capacity expressed in number of cups.</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="getModel()"><!-- --></A><H3>
getModel</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getModel</B>()</PRE>
<DL>
<DD>Returns the model of this coffee brewer.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the model of this coffee brewer.</DL>
</DD>
</DL>
<HR>
<A NAME="getWaterSupply()"><!-- --></A><H3>
getWaterSupply</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getWaterSupply</B>()</PRE>
<DL>
<DD>Returns the type of water supply.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>returns "Pour-over" or "Automatic".</DL>
</DD>
</DL>
<HR>
<A NAME="getNumberOfCups()"><!-- --></A><H3>
getNumberOfCups</H3>
<PRE>
public int <B>getNumberOfCups</B>()</PRE>
<DL>
<DD>Returns the capacity of this coffee brewer expressed in number of cups.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the capacity of this coffee brewer expressed in number of cups.</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE>
<DL>
<DD>Returns the string representation of this coffee brewer.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="Product.html#toString()">toString</A></CODE> in class <CODE><A HREF="Product.html" title="class in <Unnamed>">Product</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the string representation of this coffee brewer.</DL>
</DD>
</DL>
<HR>
<A NAME="getDataFields()"><!-- --></A><H3>
getDataFields</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/ArrayList.html" title="class or interface in java.util">ArrayList</A><<A HREF="DataField.html" title="class in <Unnamed>">DataField</A>> <B>getDataFields</B>()</PRE>
<DL>
<DD>Obtains an <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/ArrayList.html" title="class or interface in java.util"><CODE>ArrayList</CODE></A> of <A HREF="DataField.html" title="class in <Unnamed>"><CODE>DataField</CODE></A> with the names and values for each attribute of this product. <p> For class <code>CoffeeBrewer</code>, this method returns six data fields with the names: "Code", "Description", "Price", "Model", "Water supply" and "Number of cups". </p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="Product.html#getDataFields()">getDataFields</A></CODE> in class <CODE><A HREF="Product.html" title="class in <Unnamed>">Product</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>an <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/ArrayList.html" title="class or interface in java.util"><CODE>ArrayList</CODE></A> of <A HREF="DataField.html" title="class in <Unnamed>"><CODE>DataField</CODE></A> with the information of this object.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<HR>
</BODY>
</HTML>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -