net.sf.freecol.common.model
Class ProductionMap.ProductionTree

java.lang.Object
  extended by net.sf.freecol.common.model.ProductionMap.ProductionTree
Enclosing class:
ProductionMap

public class ProductionMap.ProductionTree
extends java.lang.Object


Field Summary
private  java.util.List<AbstractGoods> leafs
          The abstract goods that are actually produced.
private  AbstractGoods root
          The abstract goods all other types of goods in this tree are finally stored as.
 
Constructor Summary
ProductionMap.ProductionTree(AbstractGoods root, AbstractGoods... leafs)
           
 
Method Summary
 void add(AbstractGoods goods)
           
 AbstractGoods get(GoodsType type)
           
 java.util.List<AbstractGoods> getLeafs()
          Get the Leafs value.
 AbstractGoods getRoot()
          Get the Root value.
 int remove(AbstractGoods goods)
           
 void setLeafs(java.util.List<AbstractGoods> newLeafs)
          Set the Leafs value.
 void setRoot(AbstractGoods newRoot)
          Set the Root value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

root

private AbstractGoods root
The abstract goods all other types of goods in this tree are finally stored as.


leafs

private java.util.List<AbstractGoods> leafs
The abstract goods that are actually produced.

Constructor Detail

ProductionMap.ProductionTree

public ProductionMap.ProductionTree(AbstractGoods root,
                                    AbstractGoods... leafs)
Method Detail

getRoot

public final AbstractGoods getRoot()
Get the Root value.

Returns:
an AbstractGoods value

setRoot

public final void setRoot(AbstractGoods newRoot)
Set the Root value.

Parameters:
newRoot - The new Root value.

getLeafs

public final java.util.List<AbstractGoods> getLeafs()
Get the Leafs value.

Returns:
a List value

setLeafs

public final void setLeafs(java.util.List<AbstractGoods> newLeafs)
Set the Leafs value.

Parameters:
newLeafs - The new Leafs value.

add

public void add(AbstractGoods goods)

remove

public int remove(AbstractGoods goods)

get

public AbstractGoods get(GoodsType type)