|
JTemporal Home Tutorial |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jtemporal.AbstractTimedObject<V>
net.sf.jtemporal.SimpleTimedObject<V>
V - the type of the valuepublic class SimpleTimedObject<V>
Associates an Object to a Period. The semantics of the period is free. Is immutable when the value is immutable as well.
| Constructor Summary | |
|---|---|
SimpleTimedObject(Period period,
V value)
Unique constructor initializing the final field. |
|
| Method Summary | |
|---|---|
Period |
getPeriod()
Must always return the same Period. |
V |
getValue()
Must always return the same reference of value. |
static TimedObject |
intersect(TimedObject to,
Period p)
Returns a new SimpleTimedObject representing the common part in the two periods. |
| Methods inherited from class net.sf.jtemporal.AbstractTimedObject |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleTimedObject(Period period,
V value)
| Method Detail |
|---|
public Period getPeriod()
AbstractTimedObject
getPeriod in interface TimedObjectgetPeriod in class AbstractTimedObject<V>public V getValue()
AbstractTimedObject
getValue in interface TimedObjectgetValue in class AbstractTimedObject<V>
public static TimedObject intersect(TimedObject to,
Period p)
to - the TimedObject to be intersected, whose value is returnedp - the Period to be intersected
null if the intersection is null.
|
JTemporal Home Tutorial |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||