Commit 32541a7c authored by Julian Zobel's avatar Julian Zobel
Browse files

Removed public settings of position timestamp, cloning now sets the timestamp...

Removed public settings of position timestamp, cloning now sets the timestamp form the cloned position.
parent ef0afde5
......@@ -107,6 +107,7 @@ public class PositionVector implements Location {
for (int i = 0; i < vec.getDimensions(); i++) {
setEntry(i, vec.getEntry(i));
}
this.created = Time.getCurrentTime();
}
......@@ -161,7 +162,9 @@ public class PositionVector implements Location {
/*
* If you extend Position Vector, make sure to overwrite this method!
*/
return new PositionVector(this); // use clone constructor
PositionVector clone = new PositionVector(this); // use clone constructor
clone.setTimestamp(this.created);
return clone;
}
......@@ -554,15 +557,11 @@ public class PositionVector implements Location {
@Override
public long getAgeOfLocation() {
return Time.getCurrentTime() - created;
return Time.getCurrentTime() - created;
}
/**
*
* @param ageOfLocation the ageOfLocation to set
*/
public void setAgeofLocation(long ageOfLocation) {
this.created = ageOfLocation;
private void setTimestamp(long locationTimestamp) {
this.created = locationTimestamp;
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment