void addBranches ( int lineNumber , int numberOfBranches ) { int lineIdx = lineNumber - 1 ; Integer currentValue = branchesInLine . get ( Integer . valueOf ( lineIdx ) ) ; if ( currentValue == null ) { branchesInLine . put ( lineIdx , numberOfBranches ) ; } else { branchesInLine . put ( lineIdx , currentValue + numberOfBranches ) ; } }
Add a number of branches to a line .