Esempio n. 1
0
 @SuppressWarnings("unchecked")
 private static <K, V> HashMap<K, V> copy(Map<K, V> map) {
   HashMap<K, V> copy = new HashMap<K, V>();
   for (Iterator<Map.Entry<K, V>> i = map.entrySet().iterator(); i.hasNext(); ) {
     Map.Entry<K, V> e = i.next();
     if (e.getValue() instanceof Set) {
       copy.put(e.getKey(), (V) copy((Set) e.getValue()));
     } else {
       copy.put(e.getKey(), e.getValue());
     }
   }
   return copy;
 }
Esempio n. 2
0
 /**
  * Binds a correlating variable. References to correlating variables such as <code>$cor2</code>
  * will be replaced with java variables such as <code>
  * $Oj14</code>.
  */
 public void bindCorrel(String correlName, Variable variable) {
   mapCorrelNameToVariable.put(correlName, variable);
 }