MCPcopy Create free account
hub / github.com/GateNLP/gate-core / putAll

Method putAll

src/main/java/gate/util/RBTreeMap.java:309–327  ·  view source on GitHub ↗

Copies all of the mappings from the specified map to this map. These mappings replace any mappings that this map had for any of the keys currently in the specified map. @param map Mappings to be stored in this map. @throws ClassCastException class of a key or value in the specified m

(Map<? extends K, ? extends V> map)

Source from the content-addressed store, hash-verified

307 * keys and a specified key is <tt>null</tt>.
308 */
309 @Override
310 public void putAll(Map<? extends K, ? extends V> map) {
311 int mapSize = map.size();
312 if (size==0 && mapSize!=0 && map instanceof SortedMap) {
313 @SuppressWarnings("unchecked")
314 Comparator<? super K> c = ((SortedMap<K,V>)map).comparator();
315 if (c == comparator || (c != null && c.equals(comparator))) {
316 ++modCount;
317 try {
318 buildFromSorted(mapSize, map.entrySet().iterator(),
319 null, null);
320 } catch (java.io.IOException cannotHappen) {
321 } catch (ClassNotFoundException cannotHappen) {
322 }
323 return;
324 }
325 }
326 super.putAll(map);
327 }
328
329 /**
330 * Returns this map's entry for the given key, or <tt>null</tt> if the map

Callers 15

RBTreeMapMethod · 0.95
toFeatureMapMethod · 0.45
initConfigDataMethod · 0.45
createResourceMethod · 0.45
AnnotationSetImplMethod · 0.45
unpackCasMarkupMethod · 0.45
writeDocumentMethod · 0.45
getSelectedFileMethod · 0.45
initLocalDataMethod · 0.45
actionPerformedMethod · 0.45
runMethod · 0.45
updateStackViewMethod · 0.45

Calls 6

buildFromSortedMethod · 0.95
sizeMethod · 0.65
equalsMethod · 0.65
iteratorMethod · 0.65
comparatorMethod · 0.45
entrySetMethod · 0.45

Tested by

no test coverage detected