question: public void flattenHierarchy ( ConstraintWidgetContainer root ) { ArrayList < ConstraintWidgetContainer > containers = gatherContainers ( root ) ; while ( containers . size ( ) > 0 ) { for ( ConstraintWidgetContainer container : containers ) { removeContainer ( container ) ; } containers = gatherContainers ( root ) ; } }
target:  Flatten the hierachy -- remove all existing containers children of the given container