Package net.sf.freecol.common.model
Class ProductionMap.ProductionTree
- java.lang.Object
-
- net.sf.freecol.common.model.ProductionMap.ProductionTree
-
- Enclosing class:
- ProductionMap
public static class ProductionMap.ProductionTree extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<AbstractGoods>leafsThe abstract goods that are actually produced.private AbstractGoodsrootThe abstract goods all other types of goods in this tree are finally stored as.
-
Constructor Summary
Constructors Constructor Description ProductionTree(AbstractGoods root, AbstractGoods... leafs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(AbstractGoods goods)AbstractGoodsget(GoodsType type)java.util.List<AbstractGoods>getLeafs()AbstractGoodsgetRoot()intremove(AbstractGoods goods)voidsetLeafs(java.util.List<AbstractGoods> newLeafs)voidsetRoot(AbstractGoods newRoot)java.lang.StringtoString()
-
-
-
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
-
ProductionTree
public ProductionTree(AbstractGoods root, AbstractGoods... leafs)
-
-
Method Detail
-
getRoot
public final AbstractGoods getRoot()
-
setRoot
public final void setRoot(AbstractGoods newRoot)
-
getLeafs
public final java.util.List<AbstractGoods> getLeafs()
-
setLeafs
public final void setLeafs(java.util.List<AbstractGoods> newLeafs)
-
add
public void add(AbstractGoods goods)
-
remove
public int remove(AbstractGoods goods)
-
get
public AbstractGoods get(GoodsType type)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-