public void removeChild ( AttributeId attribute ) { if ( children == null ) { throw new IllegalArgumentException ( "No child found : " + attribute ) ; } AttributeNode < AttributeMetadata , AttributeId > child = children . get ( attribute ) ; if ( child == null ) { throw new IllegalArgumentException ( "No child found : " + attribute ) ; } children . remove ( attribute ) ; rebuildChildrenArray ( ) ; }
Decrement the usage counter of a child node and remove it if no usages remain . The removal works recursively up the path to the root .