public int getMaximumOutputQuantity(Resource resource) {
int maximumOutputQuantity = 0;
Iterator propertyIterator = getPropertiesIterator();
while (propertyIterator.hasNext()) {
Property property = (Property) propertyIterator.next();
if (property instanceof ProduceResource) {
ProduceResource produceResource = (ProduceResource) property;
maximumOutputQuantity = maximumOutputQuantity + produceResource.getMaximumOutputQuantity(resource);
}
}