question: public static Collection < Object > filterDescendants ( mxIGraphModel model , Filter filter , Object parent ) { List < Object > result = new ArrayList < Object > ( ) ; if ( filter == null || filter . filter ( parent ) ) { result . add ( parent ) ; } int childCount = model . getChildCount ( parent ) ; for ( int i = 0 ; i < childCount ; i ++ ) { Object child = model . getChildAt ( parent , i ) ; result . addAll ( filterDescendants ( model , filter , child ) ) ; } return result ; }
target:  Creates a collection of cells using the visitor pattern.