JTemporal Home
Tutorial

net.sf.jtemporal
Class AbstractTimedObject<V>

java.lang.Object
  extended by net.sf.jtemporal.AbstractTimedObject<V>
Type Parameters:
V - the type of the value
All Implemented Interfaces:
TimedObject
Direct Known Subclasses:
SimpleTimedObject

public abstract class AbstractTimedObject<V>
extends java.lang.Object
implements TimedObject

Associates an Object to a Period. The semantics of the period is free. Is immutable when the value is immutable as well.

Version:
$Id: AbstractTimedObject.java,v 1.1 2007/09/23 20:07:52 tabeck Exp $

Constructor Summary
AbstractTimedObject()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
abstract  Period getPeriod()
          Must always return the same Period.
abstract  V getValue()
          Must always return the same reference of value.
 int hashCode()
          Computes an hash code for this TimedObject.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractTimedObject

public AbstractTimedObject()
Method Detail

getPeriod

public abstract Period getPeriod()
Must always return the same Period.

Specified by:
getPeriod in interface TimedObject
Returns:
the period associated to the value

getValue

public abstract V getValue()
Must always return the same reference of value.

Specified by:
getValue in interface TimedObject
Returns:
the value

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Computes an hash code for this TimedObject.

Overrides:
hashCode in class java.lang.Object
Returns:
an hash code value for this object.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

JTemporal Home
Tutorial