private static void addToContainer ( Container container , PackingPlan . InstancePlan instancePlan , Map < String , TreeSet < Integer > > componentIndexes , Set < Integer > taskIds ) { container . add ( instancePlan ) ; String componentName = instancePlan . getComponentName ( ) ; // update componentIndex and taskIds componentIndexes . computeIfAbsent ( componentName , k -> new TreeSet < Integer > ( ) ) ; componentIndexes . get ( componentName ) . add ( instancePlan . getComponentIndex ( ) ) ; taskIds . add ( instancePlan . getTaskId ( ) ) ; }
Add instancePlan to container and update the componentIndexes and taskIds indexes