public PersistentHashArrayMappedTrie < K , V > put ( K key , V value ) { if ( root == null ) { return new PersistentHashArrayMappedTrie <> ( new Leaf <> ( key , value ) ) ; } else { return new PersistentHashArrayMappedTrie <> ( root . put ( key , value , key . hashCode ( ) , 0 ) ) ; } }
Returns a new trie where the key is set to the specified value .