Class WorkLocationPlan

    • Field Detail

      • logger

        private static final java.util.logging.Logger logger
      • workLocation

        private WorkLocation workLocation
        The work location the plan is for.
      • goodsType

        private GoodsType goodsType
        The goods to produce.
    • Constructor Detail

      • WorkLocationPlan

        public WorkLocationPlan​(AIMain aiMain,
                                WorkLocation workLocation,
                                GoodsType goodsType)
        Creates a new WorkLocationPlan.
        Parameters:
        aiMain - The main AI-object.
        workLocation - The WorkLocation to create a plan for.
        goodsType - The goodsType to be produced on the workLocation using this plan.
    • Method Detail

      • setInitialized

        public void setInitialized()
        Set the initialized flag in this object. To be implemented by leaf classes, and called in their constructors plus the special case in readChild below where we resolve forward references.
        Specified by:
        setInitialized in class AIObject
      • getWorkLocation

        public WorkLocation getWorkLocation()
        Gets the WorkLocation this WorkLocationPlan controls.
        Returns:
        The WorkLocation.
      • getGoodsType

        public GoodsType getGoodsType()
        Gets the type of goods which should be produced at the WorkLocation.
        Returns:
        The type of goods.
        See Also:
        Goods, WorkLocation
      • setGoodsType

        public void setGoodsType​(GoodsType goodsType)
        Sets the type of goods to be produced at the WorkLocation.
        Parameters:
        goodsType - The type of goods.
        See Also:
        Goods, WorkLocation
      • isFoodPlan

        public boolean isFoodPlan()
        Is this a food producing plan?
        Returns:
        True if this plan produces food.
      • getXMLTagName

        public java.lang.String getXMLTagName()
        Get the serialization tag for this object.
        Specified by:
        getXMLTagName in class FreeColObject
        Returns:
        The tag.