public void put ( Interval1D < K > interval , V value ) { Node < K , V > origNode = get ( interval ) ; if ( origNode != null ) { //System.err.println("Dupe is being put into the map. Interval: " + interval + // "\n\tOld: " + origNode.getValue() + " New: " + value); origNode . setValue ( value ) ; } else { root = randomizedInsert ( root , interval , value ) ; } }
Insert a new node in the tree . If the tree contained that interval already the value is replaced .