class CollectionHelper {

    public static <T> void handler(Collection<T> collection, ObjectHandler<T> handler) {
        if (collection == null || collection.size() == 0) {
            logger.error("collection is empty or is null");
            return;
        }
        for (T t : collection) {
            handler.handler(t);
        }
    }

}