Package fr.olympus.prometheus.entity
Interface StatableEntity
public interface StatableEntity
Interface representing an entity that has associated statistics. This interface provides methods to retrieve, merge, and replace statistics values.
-
Method Summary
Modifier and TypeMethodDescriptionMap of statistic names to their corresponding numeric values.default voidmergeStats(Map<String, Number> newStats) Merge new statistics into the existing stats values.default voidreplaceStats(Map<String, Number> newStats) Replace the existing stats values with the new ones provided in the map.
-
Method Details
-
getStatsValues
Map of statistic names to their corresponding numeric values.- Returns:
- A map containing the current statistics values for this entity, where the key is the statistic name and the value is its numeric value.
-
mergeStats
Merge new statistics into the existing stats values. If a statistic already exists, it will be updated with the new value.- Parameters:
newStats- Map of new statistic names to their corresponding numeric values to be merged into the existing stats.
-
replaceStats
Replace the existing stats values with the new ones provided in the map. This will clear the current stats and set them to the new values.- Parameters:
newStats- Map of new statistic names to their corresponding numeric values that will replace the existing stats.
-