public void withVisualItem(AggregateItem item,Consumer<VisualItem> cb){
  Iterator it=item.items(IS_SWITCH_PREDICATE);
  if (it.hasNext()) {
    cb.accept((VisualItem)it.next());
  }
}

public void withVisualItem ( AggregateItem item , Consumer < VisualItem > cb ) { Iterator it = item . items ( IS_SWITCH_PREDICATE ) ; if ( it . hasNext ( ) ) { cb . accept ( ( VisualItem ) it . next ( ) ) ; } }
runs the callback on all switch nodes within the aggregate ( will be only one ) .
