net.sf.cpsolver.ifs.util
Class ProgressWriter

java.lang.Object
  extended by net.sf.cpsolver.ifs.util.ProgressWriter
All Implemented Interfaces:
ProgressListener

public class ProgressWriter
extends Object
implements ProgressListener

Prints current progres to PrintStream.

Example usage:


Example output:

Version:
IFS 1.1 (Iterative Forward Search)
Copyright (C) 2006 Tomáš Müller
muller@unitime.org
Lazenska 391, 76314 Zlin, Czech Republic

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Constructor Summary
ProgressWriter(PrintStream out)
           
 
Method Summary
 void phaseChanged(String phase)
          Progress phase is changed
 void progressChanged(long currentProgress, long maxProgress)
          Progress bar is changed
 void progressMessagePrinted(Progress.Message msg)
          Progress message is printed
 void progressRestored()
          Progress is restored
 void progressSaved()
          Progress is saved
 void statusChanged(String status)
          Progress status is changed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressWriter

public ProgressWriter(PrintStream out)
Method Detail

statusChanged

public void statusChanged(String status)
Description copied from interface: ProgressListener
Progress status is changed

Specified by:
statusChanged in interface ProgressListener
Parameters:
status - current status name

phaseChanged

public void phaseChanged(String phase)
Description copied from interface: ProgressListener
Progress phase is changed

Specified by:
phaseChanged in interface ProgressListener
Parameters:
phase - current phase name

progressChanged

public void progressChanged(long currentProgress,
                            long maxProgress)
Description copied from interface: ProgressListener
Progress bar is changed

Specified by:
progressChanged in interface ProgressListener
Parameters:
currentProgress - current progress
maxProgress - maximum progress in this phase

progressSaved

public void progressSaved()
Description copied from interface: ProgressListener
Progress is saved

Specified by:
progressSaved in interface ProgressListener

progressRestored

public void progressRestored()
Description copied from interface: ProgressListener
Progress is restored

Specified by:
progressRestored in interface ProgressListener

progressMessagePrinted

public void progressMessagePrinted(Progress.Message msg)
Description copied from interface: ProgressListener
Progress message is printed

Specified by:
progressMessagePrinted in interface ProgressListener