org.pf.bif.callback
Interface IObjectCollector<T>


public interface IObjectCollector<T>

Implementors will be called by for elements in a loop or a recursive processing. They can be used to add the processed objects to a given collection.

Version:
1.0
Author:
M.Duchrow

Method Summary
 boolean collectObject(Collection<T> collection, T object)
          Will be called with an object that maybe must be added to the given collection.
 

Method Detail

collectObject

boolean collectObject(Collection<T> collection,
                      T object)
Will be called with an object that maybe must be added to the given collection. The decision is up to the implementor. The implementor actually must do the adding too.

Parameters:
collection - The collection to add objects (must not be null)
object - The object to be potentially added (must not be null)
Returns:
true to continue the processing, false to stop the processing


Copyright © 2012 Manfred Duchrow Consulting & Software. All Rights Reserved.