barsuift.simLife.tree
Class BasicTree

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

public class BasicTree
extends java.lang.Object
implements Tree


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

Constructor Detail

BasicTree

public BasicTree(Universe universe,
                 TreeState state)
Method Detail

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 Persistent<State>

synchronize

public void synchronize()
Specified by:
synchronize in interface Persistent<State>

getTree3D

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

getTrunk

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


Copyright © 2010. All Rights Reserved.