barsuift.simLife.tree
Class BasicTree

java.lang.Object
  extended by barsuift.simLife.tree.BasicTree
All Implemented Interfaces:
LivingPart, Tree

public class BasicTree
extends java.lang.Object
implements Tree


Constructor Summary
BasicTree(Universe universe, TreeState state)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getAge()
           
 java.util.List<TreeBranch> getBranches()
           
 java.math.BigDecimal getEnergy()
          Return the sum of branch energies
 float getHeight()
           
 java.lang.Long getId()
           
 int getNbBranches()
           
 int getNbLeaves()
           
 TreeState getState()
           
 Tree3D getTree3D()
           
 TreeTrunk getTrunk()
           
 int hashCode()
           
 void spendTime()
          Make all branches spend time
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicTree

public BasicTree(Universe universe,
                 TreeState state)
Method Detail

getId

public java.lang.Long getId()
Specified by:
getId in interface LivingPart

getAge

public int getAge()
Specified by:
getAge in interface LivingPart

spendTime

public void spendTime()
Make all branches spend time

Specified by:
spendTime in interface LivingPart

getHeight

public float getHeight()
Specified by:
getHeight in interface Tree

getNbBranches

public int getNbBranches()
Specified by:
getNbBranches in interface Tree

getEnergy

public java.math.BigDecimal getEnergy()
Return the sum of branch energies

Specified by:
getEnergy in interface Tree

getNbLeaves

public int getNbLeaves()
Specified by:
getNbLeaves in interface Tree

getBranches

public java.util.List<TreeBranch> getBranches()
Specified by:
getBranches in interface Tree

getState

public TreeState getState()
Specified by:
getState in interface Tree

getTree3D

public Tree3D getTree3D()
Specified by:
getTree3D in interface Tree

getTrunk

public TreeTrunk getTrunk()
Specified by:
getTrunk in interface Tree

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010. All Rights Reserved.