001    // GraphLab Project: http://graphlab.sharif.edu
002    // Copyright (C) 2008 Mathematical Science Department of Sharif University of Technology
003    // Distributed under the terms of the GNU Lesser General Public License (LGPL): http://www.gnu.org/licenses/
004    
005    package graphlab.library.algorithms.util;
006    
007    import graphlab.library.algorithms.Algorithm;
008    import graphlab.library.event.AlgorithmStep;
009    
010    public class EventUtils {
011    
012        /**
013         * dispatches an event in a which means that there is a Algorithm Step point here
014         *
015         * @param a
016         * @param message
017         */
018        public static void algorithmStep(Algorithm a, String message) {
019            AlgorithmStep step = new AlgorithmStep();
020            step.setMessage(message);
021            a.dispatchEvent(step);
022        }
023    
024    }