barsuift.simLife.tree
Interface Photosynthetic

All Known Subinterfaces:
Tree, TreeBranch, TreeBranchPart, TreeLeaf

public interface Photosynthetic

A photosynthetic element can collect solar energy. This collected energy is then divided in two parts : energy for the element itself, and free energy that can be collected by another element, typically, the one containing the photosynthetic element.


Method Summary
 java.math.BigDecimal collectFreeEnergy()
          Return the free energy, and reset its value to 0.
 void collectSolarEnergy()
          Collect solar energy.
 

Method Detail

collectFreeEnergy

java.math.BigDecimal collectFreeEnergy()
Return the free energy, and reset its value to 0. Thus, the free energy is entirely collected, and be be collected only once.

Returns:
the free energy

collectSolarEnergy

void collectSolarEnergy()
Collect solar energy.

If this instance contains other photosynthetic elements, it calls the collectSolarEnergy() method of these elements, immediately followed by the collectFreeEnergy() method.



Copyright © 2010. All Rights Reserved.