public class

AgingData

extends Object
java.lang.Object
   ↳ com.openxc.util.AgingData<TheUnit extends com.openxc.units.Unit>

Class Overview

AgingData is a container for a data value that keeps track of its age. This class keeps track of the birth time of a bit of data, i.e. time the AgingData object is instantiated.

Summary

Public Constructors
AgingData(TheUnit value)
Construct an instance of AgingData with the value of unit.
AgingData(Date birthdate, TheUnit value)
Public Methods
long getAge()
Retrieve the age of this piece of data.
long getTimestamp()
TheUnit getValue()
Return the value this instance wraps.
void setTimestamp(long timestamp)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AgingData (TheUnit value)

Construct an instance of AgingData with the value of unit.

Parameters
value The data value for this bit of AgingData.

public AgingData (Date birthdate, TheUnit value)

Public Methods

public long getAge ()

Retrieve the age of this piece of data.

Returns
  • the age of the data in milliseconds.

public long getTimestamp ()

public TheUnit getValue ()

Return the value this instance wraps.

Returns
  • The wrapped value (an instance of TheUnit)

public void setTimestamp (long timestamp)

public String toString ()