|
|
|
@ -222,9 +222,8 @@ public class kelondroMSetTools {
|
|
|
|
|
// comparators must be equal
|
|
|
|
|
if (map == null) return null;
|
|
|
|
|
if (set == null) return map;
|
|
|
|
|
if (map.comparator() != set.comparator()) return null;
|
|
|
|
|
if ((map.size() == 0) || (set.size() == 0)) return map;
|
|
|
|
|
|
|
|
|
|
if (map.comparator() != set.comparator()) return excludeConstructiveByTestMapInSet(map, set);
|
|
|
|
|
return excludeConstructiveByTestMapInSet(map, set);
|
|
|
|
|
// return excludeConstructiveByEnumeration(map, set);
|
|
|
|
|
}
|
|
|
|
@ -255,12 +254,16 @@ public class kelondroMSetTools {
|
|
|
|
|
c = compare(mobj, sobj, comp);
|
|
|
|
|
if (c < 0) {
|
|
|
|
|
result.put(mobj, map.get(mobj));
|
|
|
|
|
if (mi.hasNext()) mobj = mi.next(); else break;
|
|
|
|
|
if (mi.hasNext()) mobj = mi.next();
|
|
|
|
|
else break;
|
|
|
|
|
} else if (c > 0) {
|
|
|
|
|
if (si.hasNext()) sobj = si.next(); else break;
|
|
|
|
|
if (si.hasNext()) sobj = si.next();
|
|
|
|
|
else break;
|
|
|
|
|
} else {
|
|
|
|
|
if (mi.hasNext()) mobj = mi.next(); else break;
|
|
|
|
|
if (si.hasNext()) sobj = si.next(); else {
|
|
|
|
|
if (mi.hasNext()) mobj = mi.next();
|
|
|
|
|
else break;
|
|
|
|
|
if (si.hasNext()) sobj = si.next();
|
|
|
|
|
else {
|
|
|
|
|
// final flush
|
|
|
|
|
result.put(mobj, map.get(mobj));
|
|
|
|
|
while (mi.hasNext()) {
|
|
|
|
|