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>
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
Constructors Constructor Description ProductionTree(AbstractGoods root, AbstractGoods... leafs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(AbstractGoods goods)
AbstractGoods
get(GoodsType type)
java.util.List<AbstractGoods>
getLeafs()
AbstractGoods
getRoot()
int
remove(AbstractGoods goods)
void
setLeafs(java.util.List<AbstractGoods> newLeafs)
void
setRoot(AbstractGoods newRoot)
java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
-