question: public static < NodeType > Collection < NodeType > collectNodes ( final Collection < ? extends NodeType > nodes , final INodeFilter < NodeType > filter ) { Preconditions . checkNotNull ( nodes , "Error: Nodes argument can't be null" ) ; Preconditions . checkNotNull ( filter , "Error: Filter argument can't be null" ) ; final Collection < NodeType > filteredNodes = new ArrayList < NodeType > ( ) ; for ( final NodeType child : nodes ) { if ( filter . qualifies ( child ) ) { filteredNodes . add ( child ) ; } } return filteredNodes ; }
target:  Filters all nodes from a list of nodes that pass a filter check.