Newer
Older
ecologia / doc / javadoc / model / Direction.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_111) on Mon Dec 19 20:43:55 CET 2016 -->
<title>Direction</title>
<meta name="date" content="2016-12-19">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="Direction";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":9,"i5":9,"i6":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">Ecologia</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../model/Carnivore.html" title="class in model"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../model/Genome.html" title="class in model"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?model/Direction.html" target="_top">Frames</a></li>
<li><a href="Direction.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#enum.constant.summary">Enum Constants</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#enum.constant.detail">Enum Constants</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">model</div>
<h2 title="Enum Direction" class="title">Enum Direction</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>java.lang.Enum&lt;<a href="../model/Direction.html" title="enum in model">Direction</a>&gt;</li>
<li>
<ul class="inheritance">
<li>model.Direction</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable, java.lang.Comparable&lt;<a href="../model/Direction.html" title="enum in model">Direction</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>public enum <span class="typeNameLabel">Direction</span>
extends java.lang.Enum&lt;<a href="../model/Direction.html" title="enum in model">Direction</a>&gt;</pre>
<div class="block">A list of directions and common methods related to them 
 is often needed by animals.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="enum.constant.summary">
<!--   -->
</a>
<h3>Enum Constant Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Constant Summary table, listing enum constants, and an explanation">
<caption><span>Enum Constants</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Enum Constant and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../model/Direction.html#BOTTOM_LEFT">BOTTOM_LEFT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../model/Direction.html#BOTTOM_RIGHT">BOTTOM_RIGHT</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../model/Direction.html#CENTER">CENTER</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../model/Direction.html#DOWN">DOWN</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../model/Direction.html#LEFT">LEFT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../model/Direction.html#RIGHT">RIGHT</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../model/Direction.html#TOP_LEFT">TOP_LEFT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../model/Direction.html#TOP_RIGHT">TOP_RIGHT</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../model/Direction.html#UP">UP</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static <a href="../model/Direction.html" title="enum in model">Direction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../model/Direction.html#fromInt-int-">fromInt</a></span>(int&nbsp;d)</code>
<div class="block">Return the direction that this number refers to.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../model/Direction.html#getString--">getString</a></span>()</code>
<div class="block">Return a string representation of this direction.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../model/Direction.html" title="enum in model">Direction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../model/Direction.html#nextDirection-boolean-">nextDirection</a></span>(boolean&nbsp;clockwise)</code>
<div class="block">Return the next direction, going clockwise (if cw = true)
 or anticlockwise (if cw = false)</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../model/Direction.html" title="enum in model">Direction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../model/Direction.html#oppositeDirection--">oppositeDirection</a></span>()</code>
<div class="block">Return the opposite direction</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="../model/Direction.html" title="enum in model">Direction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../model/Direction.html#randomDirection--">randomDirection</a></span>()</code>
<div class="block">Return a random direction</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="../model/Direction.html" title="enum in model">Direction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../model/Direction.html#valueOf-java.lang.String-">valueOf</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Returns the enum constant of this type with the specified name.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <a href="../model/Direction.html" title="enum in model">Direction</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../model/Direction.html#values--">values</a></span>()</code>
<div class="block">Returns an array containing the constants of this enum type, in
the order they are declared.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Enum">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Enum</h3>
<code>clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ ENUM CONSTANT DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="enum.constant.detail">
<!--   -->
</a>
<h3>Enum Constant Detail</h3>
<a name="UP">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UP</h4>
<pre>public static final&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a> UP</pre>
</li>
</ul>
<a name="DOWN">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DOWN</h4>
<pre>public static final&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a> DOWN</pre>
</li>
</ul>
<a name="LEFT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LEFT</h4>
<pre>public static final&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a> LEFT</pre>
</li>
</ul>
<a name="RIGHT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RIGHT</h4>
<pre>public static final&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a> RIGHT</pre>
</li>
</ul>
<a name="TOP_RIGHT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TOP_RIGHT</h4>
<pre>public static final&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a> TOP_RIGHT</pre>
</li>
</ul>
<a name="TOP_LEFT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TOP_LEFT</h4>
<pre>public static final&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a> TOP_LEFT</pre>
</li>
</ul>
<a name="BOTTOM_LEFT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BOTTOM_LEFT</h4>
<pre>public static final&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a> BOTTOM_LEFT</pre>
</li>
</ul>
<a name="BOTTOM_RIGHT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BOTTOM_RIGHT</h4>
<pre>public static final&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a> BOTTOM_RIGHT</pre>
</li>
</ul>
<a name="CENTER">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CENTER</h4>
<pre>public static final&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a> CENTER</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="values--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>values</h4>
<pre>public static&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a>[]&nbsp;values()</pre>
<div class="block">Returns an array containing the constants of this enum type, in
the order they are declared.  This method may be used to iterate
over the constants as follows:
<pre>
for (Direction c : Direction.values())
&nbsp;   System.out.println(c);
</pre></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array containing the constants of this enum type, in the order they are declared</dd>
</dl>
</li>
</ul>
<a name="valueOf-java.lang.String-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>valueOf</h4>
<pre>public static&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a>&nbsp;valueOf(java.lang.String&nbsp;name)</pre>
<div class="block">Returns the enum constant of this type with the specified name.
The string must match <i>exactly</i> an identifier used to declare an
enum constant in this type.  (Extraneous whitespace characters are 
not permitted.)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the enum constant to be returned.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the enum constant with the specified name</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if this enum type has no constant with the specified name</dd>
<dd><code>java.lang.NullPointerException</code> - if the argument is null</dd>
</dl>
</li>
</ul>
<a name="oppositeDirection--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>oppositeDirection</h4>
<pre>public&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a>&nbsp;oppositeDirection()</pre>
<div class="block">Return the opposite direction</div>
</li>
</ul>
<a name="nextDirection-boolean-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextDirection</h4>
<pre>public&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a>&nbsp;nextDirection(boolean&nbsp;clockwise)</pre>
<div class="block">Return the next direction, going clockwise (if cw = true)
 or anticlockwise (if cw = false)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>clockwise</code> - </dd>
</dl>
</li>
</ul>
<a name="randomDirection--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>randomDirection</h4>
<pre>public static&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a>&nbsp;randomDirection()</pre>
<div class="block">Return a random direction</div>
</li>
</ul>
<a name="fromInt-int-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fromInt</h4>
<pre>public static&nbsp;<a href="../model/Direction.html" title="enum in model">Direction</a>&nbsp;fromInt(int&nbsp;d)</pre>
<div class="block">Return the direction that this number refers to.</div>
</li>
</ul>
<a name="getString--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getString</h4>
<pre>public&nbsp;java.lang.String&nbsp;getString()</pre>
<div class="block">Return a string representation of this direction.</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">Ecologia</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../model/Carnivore.html" title="class in model"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../model/Genome.html" title="class in model"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?model/Direction.html" target="_top">Frames</a></li>
<li><a href="Direction.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#enum.constant.summary">Enum Constants</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#enum.constant.detail">Enum Constants</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>