Commit c5bd7d43 authored by Nico Mack's avatar Nico Mack

Added reset flag to wasModified method

parent be5a2e9a
......@@ -178,7 +178,7 @@ public abstract class Variable<V> implements Cloneable {
* @return The value held by the {@link Variable} instance.
*/
public V getValue() {
this.modified = false;
// this.modified = false;
return value;
}
......@@ -188,8 +188,11 @@ public abstract class Variable<V> implements Cloneable {
* @return <code>true</code> if variable was modified since last read, <code>false</code> otherwise.
*/
public boolean wasModified() {
return this.modified;
public boolean wasModified(boolean reset) {
boolean wasModified = this.modified;
if (reset)
this.modified = false;
return wasModified;
}
/**
......
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