
timeBench.data.Instant Maven / Gradle / Ivy
Show all versions of timebench Show documentation
package timeBench.data;
import java.util.Collections;
import timeBench.calendar.Granule;
/**
* Instant in the relational view. Following the
* proxy tuple pattern [Heer & Agrawala, 2006] it provides an object
* oriented proxy for accessing a row of the temporal elements table.
*
*
* This class assumes that the underlying data tuple is an instant.
*
* @author Rind
*/
public class Instant extends AnchoredTemporalElement {
/**
* creates an invalid TemporalElement. Use {@link TemporalDataset} as a
* factory!
*/
protected Instant() {
}
@Override
public Iterable childElements() {
// an instant should not have children (speedup?)
return Collections. emptyList();
}
@Override
public int getChildCount() {
// an instant should not have children (speedup?)
return 0;
}
public void set(Granule granule) throws TemporalDataException {
((TemporalElementStore) getGraph()).set(this, granule);
}
}