?? animal.html
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Sun Aug 17 16:59:58 GMT-05:00 2003 -->
<TITLE>
Animal
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="Animal";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD>
</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-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="AlgaeColony.html"><B>PREV CLASS</B></A>
<A HREF="LivingBeing.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="Animal.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><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>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
Class Animal</H2>
<PRE>
java.lang.Object
|
+--<A HREF="LivingBeing.html">LivingBeing</A>
|
+--<B>Animal</B>
</PRE>
<HR>
<DL>
<DT>public class <B>Animal</B><DT>extends <A HREF="LivingBeing.html">LivingBeing</A></DL>
<P>
Animals can move.
<P>
<P>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<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>protected static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="Animal.html#DOWN">DOWN</A></B></CODE>
<BR>
String constant - used to indicate the direction animal is facing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="Animal.html#LEFT">LEFT</A></B></CODE>
<BR>
String constant - used to indicate the direction animal is facing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="Animal.html#RIGHT">RIGHT</A></B></CODE>
<BR>
String constant - used to indicate the direction animal is facing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="Animal.html#UP">UP</A></B></CODE>
<BR>
String constant - used to indicate the direction animal is facing.</TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_LivingBeing"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class <A HREF="LivingBeing.html">LivingBeing</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="LivingBeing.html#ALIVE">ALIVE</A>, <A HREF="LivingBeing.html#column">column</A>, <A HREF="LivingBeing.html#DEAD">DEAD</A>, <A HREF="LivingBeing.html#maxEnergy">maxEnergy</A>, <A HREF="LivingBeing.html#minEnergy">minEnergy</A>, <A HREF="LivingBeing.html#row">row</A>, <A HREF="LivingBeing.html#simulation">simulation</A></CODE></TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<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="Animal.html#Animal(int, int, Simulation, java.lang.String, int, int)">Animal</A></B>(int initialRow,
int initialColumn,
Simulation initialSimulation,
java.lang.String initialName,
int minEnergy,
int maxEnergy)</CODE>
<BR>
Create an animal at a given location with a
given energy and store the simulation to which the animal belongs.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<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>protected java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="Animal.html#getDirection()">getDirection</A></B>()</CODE>
<BR>
Get the direction faced by the animal.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="Animal.html#isHungry()">isHungry</A></B>()</CODE>
<BR>
Is the animal hungry?</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="Animal.html#moveToColumn(int)">moveToColumn</A></B>(int newColumn)</CODE>
<BR>
Move the animal to a new column, if new column is within lake bounds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="Animal.html#moveToRow(int)">moveToRow</A></B>(int newRow)</CODE>
<BR>
Move the animal to a new row, if new row is within lake bounds.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_LivingBeing"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class <A HREF="LivingBeing.html">LivingBeing</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="LivingBeing.html#createLivingBeing(Simulation, java.lang.String, java.lang.String)">createLivingBeing</A>, <A HREF="LivingBeing.html#die()">die</A>, <A HREF="LivingBeing.html#getAge()">getAge</A>, <A HREF="LivingBeing.html#getColor()">getColor</A>, <A HREF="LivingBeing.html#getColumn()">getColumn</A>, <A HREF="LivingBeing.html#getDisplayMechanism()">getDisplayMechanism</A>, <A HREF="LivingBeing.html#getEnergy()">getEnergy</A>, <A HREF="LivingBeing.html#getImage()">getImage</A>, <A HREF="LivingBeing.html#getMaxEnergy()">getMaxEnergy</A>, <A HREF="LivingBeing.html#getMinEnergy()">getMinEnergy</A>, <A HREF="LivingBeing.html#getName()">getName</A>, <A HREF="LivingBeing.html#getRow()">getRow</A>, <A HREF="LivingBeing.html#getSpecies()">getSpecies</A>, <A HREF="LivingBeing.html#isDead()">isDead</A>, <A HREF="LivingBeing.html#liveALittle()">liveALittle</A>, <A HREF="LivingBeing.html#setEnergy(int)">setEnergy</A></CODE></TD>
</TR>
</TABLE>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -