Package modelarium.results.readonly
Class ReadOnlyResultsForEnvironment
java.lang.Object
modelarium.results.readonly.ReadOnlyResultsForEnvironment
Class for providing a read-only view of the model's environment-level results.
This class wraps a ResultsForEnvironment instance so that the environment's logs can be queried
without being modifiable, with every returned list and map wrapped as unmodifiable.
-
Method Summary
Modifier and TypeMethodDescriptionintattributeLogCount(String attributeSetName) Returns the number of attribute logs recorded in the environment's named attribute set.attributeLogs(String attributeSetName, String attributeName) Retrieves the values logged for a single attribute of the environment.<T> List<T> attributeLogs(String attributeSetName, String attributeName, Class<T> type) Retrieves the values logged for a single attribute of the environment, cast to the given type.intReturns the number of attribute set logs recorded for the environment.attributeSetLogs(String attributeSetName) Retrieves the values logged for every attribute in one of the environment's attribute sets.Retrieves the values logged for every attribute of the environment.
-
Method Details
-
attributeSetLogCount
public int attributeSetLogCount()Returns the number of attribute set logs recorded for the environment.- Returns:
- the environment's attribute set log count
-
attributeLogCount
Returns the number of attribute logs recorded in the environment's named attribute set.- Parameters:
attributeSetName- the name of the attribute set whose logs to count- Returns:
- the attribute set's attribute log count
-
attributeLogs
Retrieves the values logged for a single attribute of the environment.- Parameters:
attributeSetName- the name of the attribute set the attribute belongs toattributeName- the name of the attribute whose values to retrieve- Returns:
- an unmodifiable list of the attribute's logged values, one per tick
-
attributeLogs
Retrieves the values logged for a single attribute of the environment, cast to the given type.- Type Parameters:
T- the type the logged values are returned as- Parameters:
attributeSetName- the name of the attribute set the attribute belongs toattributeName- the name of the attribute whose values to retrievetype- the class to cast each logged value to- Returns:
- an unmodifiable list of the attribute's logged values, one per tick
-
attributeSetLogs
Retrieves the values logged for every attribute in one of the environment's attribute sets.- Parameters:
attributeSetName- the name of the attribute set whose logs to retrieve- Returns:
- an unmodifiable map from attribute name to that attribute's logged values
-
environmentLogs
Retrieves the values logged for every attribute of the environment.- Returns:
- an unmodifiable map from attribute set name to a map from attribute name to that attribute's logged values
-