?? animal.html
字號:
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="RIGHT"><!-- --></A><H3>
RIGHT</H3>
<PRE>
protected static final java.lang.String <B>RIGHT</B></PRE>
<DL>
<DD>String constant - used to indicate the direction animal is facing.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="constant-values.html#Animal.RIGHT">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="LEFT"><!-- --></A><H3>
LEFT</H3>
<PRE>
protected static final java.lang.String <B>LEFT</B></PRE>
<DL>
<DD>String constant - used to indicate the direction animal is facing.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="constant-values.html#Animal.LEFT">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="UP"><!-- --></A><H3>
UP</H3>
<PRE>
protected static final java.lang.String <B>UP</B></PRE>
<DL>
<DD>String constant - used to indicate the direction animal is facing.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="constant-values.html#Animal.UP">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DOWN"><!-- --></A><H3>
DOWN</H3>
<PRE>
protected static final java.lang.String <B>DOWN</B></PRE>
<DL>
<DD>String constant - used to indicate the direction animal is facing.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="constant-values.html#Animal.DOWN">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<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="Animal(int, int, Simulation, java.lang.String, int, int)"><!-- --></A><H3>
Animal</H3>
<PRE>
public <B>Animal</B>(int initialRow,
int initialColumn,
Simulation initialSimulation,
java.lang.String initialName,
int minEnergy,
int maxEnergy)</PRE>
<DL>
<DD>Create an animal at a given location with a
given energy and store the simulation to which the animal belongs.
Cap row and column within lake boundary.
<P>
<DT><B>Parameters:</B><DD><CODE>initialRow</CODE> - - the row location of animal<DD><CODE>initialColumn</CODE> - - the column locaiton of animal<DD><CODE>initialSimulation</CODE> - - the simulation to which this animal belongs<DD><CODE>initialName</CODE> - - name of the animal</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="getDirection()"><!-- --></A><H3>
getDirection</H3>
<PRE>
protected java.lang.String <B>getDirection</B>()</PRE>
<DL>
<DD>Get the direction faced by the animal.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the facing direction.</DL>
</DD>
</DL>
<HR>
<A NAME="isHungry()"><!-- --></A><H3>
isHungry</H3>
<PRE>
protected boolean <B>isHungry</B>()</PRE>
<DL>
<DD>Is the animal hungry?
<P>
<DD><DL>
<DT><B>Returns:</B><DD>True, if hungry. False, otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="moveToRow(int)"><!-- --></A><H3>
moveToRow</H3>
<PRE>
protected int <B>moveToRow</B>(int newRow)</PRE>
<DL>
<DD>Move the animal to a new row, if new row is within lake bounds.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>newRow</CODE> - - the row to move to.
<DT><B>Returns:</B><DD>the row moved to. Lake boundary limits movement. -1, if dead</DL>
</DD>
</DL>
<HR>
<A NAME="moveToColumn(int)"><!-- --></A><H3>
moveToColumn</H3>
<PRE>
protected int <B>moveToColumn</B>(int newColumn)</PRE>
<DL>
<DD>Move the animal to a new column, if new column is within lake bounds.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>newColumn</CODE> - - the column to move to.
<DT><B>Returns:</B><DD>the column moved to. Lake boundary limits movement.</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=3 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"> <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>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -