Class ProcessingUnitStatistic
- java.lang.Object
-
- com.github.toolarium.processing.unit.runtime.ProcessingUnitStatistic
-
- All Implemented Interfaces:
IProcessingUnitStatistic,java.io.Serializable
public class ProcessingUnitStatistic extends java.lang.Object implements IProcessingUnitStatistic, java.io.Serializable
ImplementsIProcessingUnitStatistic.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProcessingUnitStatistic()ConstructorProcessingUnitStatistic(IProcessingUnitStatistic processingStatistic)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessingUnitStatisticadd(java.lang.String key, com.github.toolarium.common.statistic.StatisticCounter statisticCounterToAdd)Add a statistic counterProcessingUnitStatisticadd(java.lang.String key, java.lang.Double value)Add a value to the statistic counterProcessingUnitStatisticadd(java.lang.String key, java.lang.Long value)Add a value to the statistic counterbooleanequals(java.lang.Object obj)com.github.toolarium.common.statistic.StatisticCounterget(java.lang.String key)Gets the statistic countercom.github.toolarium.common.statistic.StatisticCountergetOrAdd(java.lang.String key)Get or add a statistic counterinthashCode()booleanhasKey(java.lang.String key)Test if a key is defined or notbooleanisEmpty()Check if the statistic if emptyjava.util.Set<java.lang.String>keySet()Returns the statistic key setcom.github.toolarium.common.statistic.StatisticCounterput(java.lang.String key, com.github.toolarium.common.statistic.StatisticCounter value)Put a statistic valueintsize()Get the size of the statistic elementsjava.lang.StringtoString()
-
-
-
Constructor Detail
-
ProcessingUnitStatistic
public ProcessingUnitStatistic()
Constructor
-
ProcessingUnitStatistic
public ProcessingUnitStatistic(IProcessingUnitStatistic processingStatistic)
Constructor- Parameters:
processingStatistic- the processing statistic
-
-
Method Detail
-
keySet
public java.util.Set<java.lang.String> keySet()
Description copied from interface:IProcessingUnitStatisticReturns the statistic key set- Specified by:
keySetin interfaceIProcessingUnitStatistic- Returns:
- the key set
- See Also:
IProcessingUnitStatistic.keySet()
-
hasKey
public boolean hasKey(java.lang.String key)
Description copied from interface:IProcessingUnitStatisticTest if a key is defined or not- Specified by:
hasKeyin interfaceIProcessingUnitStatistic- Parameters:
key- the key- Returns:
- true if it exist
- See Also:
IProcessingUnitStatistic.hasKey(java.lang.String)
-
get
public com.github.toolarium.common.statistic.StatisticCounter get(java.lang.String key)
Description copied from interface:IProcessingUnitStatisticGets the statistic counter- Specified by:
getin interfaceIProcessingUnitStatistic- Parameters:
key- the statistic key- Returns:
- the value if it was set; otherwise null
- See Also:
IProcessingUnitStatistic.get(java.lang.String)
-
getOrAdd
public com.github.toolarium.common.statistic.StatisticCounter getOrAdd(java.lang.String key)
Get or add a statistic counter- Parameters:
key- the key- Returns:
- the statistic counter
- Throws:
java.lang.IllegalArgumentException- In case of an invalid key
-
add
public ProcessingUnitStatistic add(java.lang.String key, java.lang.Long value)
Add a value to the statistic counter- Parameters:
key- the key / name of the statisticvalue- the value to add- Returns:
- this instance
-
add
public ProcessingUnitStatistic add(java.lang.String key, java.lang.Double value)
Add a value to the statistic counter- Parameters:
key- the key / name of the statisticvalue- the value to add- Returns:
- this instance
-
add
public ProcessingUnitStatistic add(java.lang.String key, com.github.toolarium.common.statistic.StatisticCounter statisticCounterToAdd)
Add a statistic counter- Parameters:
key- the keystatisticCounterToAdd- the statistic counter to add- Returns:
- this instance
-
put
public com.github.toolarium.common.statistic.StatisticCounter put(java.lang.String key, com.github.toolarium.common.statistic.StatisticCounter value)Put a statistic value- Parameters:
key- the keyvalue- the statistic value- Returns:
- the previous set statistic value; otherwise null
-
isEmpty
public boolean isEmpty()
Description copied from interface:IProcessingUnitStatisticCheck if the statistic if empty- Specified by:
isEmptyin interfaceIProcessingUnitStatistic- Returns:
- true if it is empty
- See Also:
IProcessingUnitStatistic.isEmpty()
-
size
public int size()
Description copied from interface:IProcessingUnitStatisticGet the size of the statistic elements- Specified by:
sizein interfaceIProcessingUnitStatistic- Returns:
- the size
- See Also:
IProcessingUnitStatistic.size()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-