| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
evolution.KnowledgeCatalog | +--evolution.resources.ResourceKnowledgeCatalog
The Resource KnowledgeCatalog.
Field Summary | |
protected static ResourceKnowledgeCatalog | instance Instance of the singleton. |
Constructor Summary | |
protected | ResourceKnowledgeCatalog(String fileName) Create a new KnowledgeCatalog from the given file. |
Method Summary | |
void | addResources(Map resMap, double percentage) Add a percentage of a maximum to the world resources. |
static ResourceKnowledgeCatalog | getInst() Return the instance of this singleton. |
Resource | getResource(String resName) Return the resource with the given name. |
Map | getResourceInstances() An map of all resources which are connected to the current world. |
InfoList | getResourcesInfo() Generate an info list of all available resources. |
List | getResourcesNames() The names of the worldresources. |
Map | getResourcesStringDoubleMap() Get the current world resources as a (String, Double) Map. |
double | influencedByResources(String actionName, double v) Influence a value by all resources that influence the given action. |
static void | initialize(String fileName) Initialize this singleton from the given file. |
boolean | isTemporary(String resourceName) Is the named resource a temporary one? |
void | modResource(String resourceName, double v) Increase or decrease the named resource with the given value. |
void | modResource(String resourceName, String actionName, double v) Increase or decrease the named resource with the given value. |
protected void | parseResources(String resourcesString) Parse the resources string. |
void | resetTemporaries() Reset all temporary resources to their minimum. |
void | setResources(Map resMap) Set the worldresources. |
void | setTemporaries(Map max, double percentage) Set all the temporary resources. |
List | transformsFrom(String resourceName) See from which resources we can fullfill the need for this one. |
Methods inherited from class evolution.KnowledgeCatalog |
dlClassForName, extractArgument, extractName, extractValue, getFileName, getProperty, getProperty, getResourcePath, isInitialized, makeStringDoubleMap, setResourcePath, split, stripPathFromClassName, stripPathFromClassName, stripPathFromClassName |
Field Detail |
protected static ResourceKnowledgeCatalog instance
Constructor Detail |
protected ResourceKnowledgeCatalog(String fileName)
throws java.io.IOException,
java.io.FileNotFoundException
Method Detail |
public void addResources(Map resMap, double percentage)
public static ResourceKnowledgeCatalog getInst()
public Resource getResource(String resName)
public Map getResourceInstances()
public InfoList getResourcesInfo()
public List getResourcesNames()
public Map getResourcesStringDoubleMap()
public double influencedByResources(String actionName, double v)
public static void initialize(String fileName)
throws java.io.FileNotFoundException,
java.io.IOException
public boolean isTemporary(String resourceName)
public void modResource(String resourceName, double v)
throws NotEnoughResourcesException
public void modResource(String resourceName, String actionName, double v)
throws NotEnoughResourcesException
protected void parseResources(String resourcesString)
public void resetTemporaries()
public void setResources(Map resMap)
public void setTemporaries(Map max, double percentage)
public List transformsFrom(String resourceName)
Association Links |
to Class java.util.Map
to Class evolution.resources.ResourceKnowledgeCatalog
| a gvijf production | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |