blob: ffc1502ec4196170734591662a589ba3a78f3793 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
package org.eclipse.cdt.codan.extension;
import org.eclipse.ptp.pldt.mpi.analysis.cdt.graphs.IBlock;
public class TruthAssignment {
private IBlock blk;
private Boolean value;
public TruthAssignment(IBlock blk, Boolean value) {
this.blk = blk;
this.value = value;
}
public IBlock getOrigin() {
return blk;
}
public Boolean getValue() {
return value;
}
@Override
public boolean equals(Object obj) {
if (obj instanceof TruthAssignment) {
TruthAssignment other = (TruthAssignment) obj;
return blk.equals(other.getOrigin()) && value.equals(other.getValue());
}
return false;
}
@Override
public int hashCode() {
return blk.hashCode() + value.hashCode();
}
}
|