projects
/
IRC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a bug fix...
[IRC.git]
/
Robust
/
src
/
Util
/
Lattice.java
diff --git
a/Robust/src/Util/Lattice.java
b/Robust/src/Util/Lattice.java
index b76b7bb0185f4ca7ee3fef7031f7792843d99e09..0418d237b3d7645a3fbf0582fe4d18350cb58098 100644
(file)
--- a/
Robust/src/Util/Lattice.java
+++ b/
Robust/src/Util/Lattice.java
@@
-66,12
+66,12
@@
public class Lattice<T> {
}
public boolean put(T key, T value) {
}
public boolean put(T key, T value) {
-
- if
(isGreaterThan(key, value))
{
+
+ if
(isComparable(key, value) && isGreaterThan(key, value))
{
// this relation already exists
return false;
}
// this relation already exists
return false;
}
-
+
Set<T> s;
Set<T> topNeighbor = table.get(top);
Set<T> s;
Set<T> topNeighbor = table.get(top);
@@
-95,10
+95,9
@@
public class Lattice<T> {
}
// if value is already connected with top, it is no longer to be
}
// if value is already connected with top, it is no longer to be
- if
(!key.equals(top))
{
- topNeighbor.remove(value);
+ if
(!key.equals(top))
{
+ topNeighbor.remove(value);
}
}
-
// if key is already connected with bottom,, it is no longer to be
if (!value.equals(getBottomItem())) {
// if key is already connected with bottom,, it is no longer to be
if (!value.equals(getBottomItem())) {