private static void displayInventoryTreeHelper ( AdUnit root , Map < String , List < AdUnit > > treeMap , int depth ) { System . out . println ( generateTab ( depth ) + root . getName ( ) + " (" + root . getId ( ) + ")" ) ; if ( treeMap . get ( root . getId ( ) ) != null ) { for ( AdUnit child : treeMap . get ( root . getId ( ) ) ) { displayInventoryTreeHelper ( child , treeMap , depth + 1 ) ; } } }
Helper for displaying inventory units .