code: public static <K,V> Map<K,V> intersect(Map<K,V> left, Map<K,V> right) {
          final Map<K,V> ansMap = createSimilarMap(left);
          if (right != null && !right.isEmpty()) {
              for (Map.Entry<K, V> e1 : left.entrySet()) {
                  for (Map.Entry<K, V> e2 : right.entrySet()) {
                      if (DefaultTypeTransformation.compareEqual(e1, e2)) {
                          ansMap.put(e1.getKey(), e1.getValue());
                      }
                  }
              }
          }
          return ansMap;
      }
docs: Create a Map composed of the intersection of both maps.
  Any entries that exist in both maps are added to the resultant map.
  <pre class="groovyTestCase">assert [4:4,5:5] == [1:1,2:2,3:3,4:4,5:5].intersect([4:4,5:5,6:6,7:7,8:8])</pre>
  <pre class="groovyTestCase">assert [1: 1, 2: 2, 3: 3, 4: 4].intersect( [1: 1.0, 2: 2, 5: 5] ) == [1:1, 2:2]</pre>
  
  @param left     a map
  @param right    a map
  @return a Map as an intersection of both maps
  @since 1.7.4