for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
package it.cnr.istc.pst.platinum.ai.framework.time.tn;
/**
*
* @author alessandro
*/
public class TimePoint extends TemporalData
{
private long domLb;
private long domUb;
// computed values
private long lb;
private long ub;
private double execTime;
* @param id
* @param lb
* @param ub
protected TimePoint(int id, long lb, long ub) {
super(id);
this.domLb = lb;
this.domUb = ub;
// initialize data
this.lb = this.domLb;
this.ub = this.domUb;
}
public void clear(long lb, long ub) {
this.execTime = 0;
protected void setDomLb(long lb) {
protected void setDomUb(long ub) {
* @return
public long getDomLb() {
return this.domLb;
public long getDomUb() {
return this.domUb;
public void setLowerBound(long lb) {
this.lb = lb;
public long getLowerBound() {
return lb;
public void setUpperBound(long ub) {
this.ub = ub;
public long getUpperBound() {
return ub;
* @param execTime
public void setExecTime(double execTime) {
this.execTime = execTime;
public double getExecTime() {
return execTime;
public TimePoint clone() {
TimePoint clone = new TimePoint(this.id, this.domLb, this.domUb);
clone.setLowerBound(this.lb);
clone.setUpperBound(this.ub);
clone.setExecTime(this.execTime);
return clone;
@Override
public int compareTo(TemporalData o) {
// get time point
TimePoint p = (TimePoint) o;
return this.lb < p.lb ? -1 : this.lb == p.lb && this.ub < p.ub ? -1 :
this.lb == p.lb && this.ub == p.ub ? 0 : 1;
public String toString() {
return "[TimePoint id=" + this.id + ", lb= " + this.lb + ", ub= " + this.ub + "]";