blob: 23502857bdccf9e746083375d4fb5b81e4b4aa7f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package org.eclipse.viatra.solver.data.map.internal;
public class OldValueBox<V>{
V oldValue;
boolean isSet = false;
public V getOldValue() {
if(!isSet) throw new IllegalStateException();
isSet = false;
return oldValue;
}
public void setOldValue(V ouldValue) {
if(isSet) throw new IllegalStateException();
this.oldValue = ouldValue;
isSet = true;
}
}
|