messif.statistics
Class StatisticSlidingAvgCounter.ValueTime

java.lang.Object
  extended by messif.statistics.StatisticSlidingAvgCounter.ValueTime
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
StatisticSlidingAvgCounter

protected static class StatisticSlidingAvgCounter.ValueTime
extends java.lang.Object
implements java.io.Serializable

This simple class encapsulates the pair: double value + time when it was added

See Also:
Serialized Form

Field Summary
protected  java.lang.Object key
           
protected  long time
           
protected  double value
           
 
Constructor Summary
protected StatisticSlidingAvgCounter.ValueTime(double value, long time)
          Default constructor sets the key to null
protected StatisticSlidingAvgCounter.ValueTime(double value, long time, java.lang.Object key)
          Full constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare the items according to the key
 int hashCode()
          HashCode is consistent with equals
 java.lang.String toString()
          To string method
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected double value

time

protected long time

key

protected final java.lang.Object key
Constructor Detail

StatisticSlidingAvgCounter.ValueTime

protected StatisticSlidingAvgCounter.ValueTime(double value,
                                               long time)
Default constructor sets the key to null


StatisticSlidingAvgCounter.ValueTime

protected StatisticSlidingAvgCounter.ValueTime(double value,
                                               long time,
                                               java.lang.Object key)
Full constructor

Method Detail

equals

public boolean equals(java.lang.Object obj)
Compare the items according to the key

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
HashCode is consistent with equals

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
To string method

Overrides:
toString in class java.lang.Object