public void addPath ( T value , byte [ ] ... parts ) { int depth = 0 ; ByteTrieNode < T > node = _root ; for ( byte [ ] part : parts ) { for ( byte b : part ) { ByteTrieNode < T > child = node . _children . get ( b ) ; if ( child == null ) { child = new ByteTrieNode < T > ( ) ; node . _children . put ( b , child ) ; } node = child ; depth ++ ; } } if ( depth == 0 ) throw new IllegalArgumentException ( "Parts must contain at least one byte." ) ; node . setValue ( value ) ; _maxDepth = Math . max ( _maxDepth , depth ) ; }
Store the given value at the specified path .