--- /dev/null
+package Util;
+
+import java.util.Set;
+
+public class JoinOpSetUnion implements JoinOp<Set> {
+ public Set join( Set a, Set b ) {
+ Set out = new HashSet();
+ if( a != null ) {
+ out.addAll( a );
+ }
+ if( b != null ) {
+ out.addAll( b );
+ }
+ return out;
+ }
+}
private boolean checkTypes;\r
private boolean checkConsistency;\r
\r
+\r
+ // for MultiViewMaps that don't need to use the value,\r
+ // template on type Object and map every key to this dummy\r
+ public static Object dummy = new Integer( -12345 );\r
+\r
+\r
// If the entire contents of this map are fullKey -> value:\r
// <a,b> -> 1\r
// <c,b> -> 2\r
}\r
\r
\r
- public int size() {\r
- return fullKey2value.size();\r
- }\r
-\r
public boolean equals( Object o ) {\r
if( this == o ) {\r
return true;\r
}\r
\r
\r
+ public int size() {\r
+ return fullKey2value.size();\r
+ }\r
+\r
+\r
+ public void clear() {\r
+ fullKey2value.clear();\r
+ view2partialKey2fullKeys.clear();\r
+ }\r
+\r
\r
public void put( MultiKey fullKey, T value ) {\r
assert( typesMatch( fullKey ) );\r