Examples of UnitContainerManager


Examples of org.freerealm.UnitContainerManager

        Node resourceStorageNode = XMLConverterUtility.findNode(node, "ResourceStorage");
        ResourceStorageManager resourceStorageManager = new ResourceStorageManagerXMLConverter().initializeFromNode(realm, resourceStorageNode);
        containerManager.setResourceStorageManager(resourceStorageManager);
        Node unitContainerManagerNode = XMLConverterUtility.findNode(node, "UnitContainerManager");
        if (unitContainerManagerNode != null) {
            UnitContainerManager unitContainerManager = new UnitContainerManagerXMLConverter(containerUnit).initializeFromNode(realm, unitContainerManagerNode);
            containerManager.setUnitContainerManager(unitContainerManager);
        }
        Node populationNode = XMLConverterUtility.findNode(node, "containedPopulation");
        if (populationNode != null) {
            int population = Integer.parseInt(populationNode.getFirstChild().getNodeValue());
View Full Code Here

Examples of org.freerealm.UnitContainerManager

        }
        return xml.toString();
    }

    public UnitContainerManager initializeFromNode(Realm realm, Node node) {
        UnitContainerManager unitContainerManager = new UnitContainerManager(containerUnit);
        unitContainerManager.clear();
        for (Node subNode = node.getFirstChild(); subNode != null; subNode = subNode.getNextSibling()) {
            if (subNode.getNodeType() == Node.ELEMENT_NODE) {
                int unitId = Integer.parseInt(subNode.getFirstChild().getNodeValue());
                unitContainerManager.addUnit(unitId);
            }
        }
        return unitContainerManager;
    }
View Full Code Here

Examples of org.freerealm.UnitContainerManager

    private int containedPopulation;

    public ContainerManager(Realm realm, Unit containerUnit) {
        this.realm = realm;
        resourceStorageManager = new ResourceStorageManager(realm);
        unitContainerManager = new UnitContainerManager(containerUnit);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.