Package org.freerealm.property

Examples of org.freerealm.property.StoreResource


        return "<StoreResource resource=\"" + storeResource.getResource() + "\" storage=\"" + storeResource.getStorage() + "\" />";

    }

    public StoreResource initializeFromNode(Realm realm, Node node) {
        StoreResource storeResource = new StoreResource();
        String resourceString = node.getAttributes().getNamedItem("resource").getNodeValue();
        String storageString = node.getAttributes().getNamedItem("storage").getNodeValue();
        storeResource.setResource(realm.getResourceManager().getResource(resourceString));
        storeResource.setStorage(Integer.parseInt(storageString));
        return storeResource;
    }
View Full Code Here


        int capacityModifier = 0;
        Iterator<Property> propertyEditor = getPropertiesIterator();
        while (propertyEditor.hasNext()) {
            Property property = propertyEditor.next();
            if (property instanceof StoreResource) {
                StoreResource storeResource = (StoreResource) property;
                if (resource.equals(storeResource.getResource())) {
                    capacityModifier = capacityModifier + storeResource.getStorage();
                }
            }
        }
        return capacityModifier;
    }
View Full Code Here

TOP

Related Classes of org.freerealm.property.StoreResource

Copyright © 2018 www.massapicom. 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.