MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / put

Method put

collectiontopics/AssociativeArray.java:13–17  ·  view source on GitHub ↗
(K key, V value)

Source from the content-addressed store, hash-verified

11 pairs = new Object[length][2];
12 }
13 public void put(K key, V value) {
14 if(index >= pairs.length)
15 throw new ArrayIndexOutOfBoundsException();
16 pairs[index++] = new Object[]{ key, value };
17 }
18 @SuppressWarnings("unchecked")
19 public V get(K key) {
20 for(int i = 0; i < index; i++)

Callers 8

mainMethod · 0.95
mainMethod · 0.45
mainMethod · 0.45
MapOfListClass · 0.45
fillMethod · 0.45
mainMethod · 0.45
putDownMethod · 0.45
mainMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected