001 package ifs.solution;
002
003 /**
004 * IFS solution listener.
005 *
006 * @see Solution
007 *
008 * @author <a href="mailto:muller@ktiml.mff.cuni.cz">Tomáš Müller</a>
009 * @version 1.0
010 */
011 public interface SolutionListener {
012 /** Called by the solution when it is updated, see {@link Solution#update(double)}.
013 * @param solution source solution
014 */
015 public void solutionUpdated(Solution solution);
016
017 /** Called by the solution when it is asked to produce info table, see {@link Solution#getInfo()}.
018 * A listener can also add some its info into this table.
019 * @param solution source solution
020 * @param info produced info table
021 */
022 public void getInfo(Solution solution, java.util.Dictionary info);
023
024 /** Called by the solution when method {@link Solution#clearBest()} is called.
025 * @param solution source solution
026 */
027 public void bestCleared(Solution solution);
028
029 /** Called by the solution when method {@link Solution#saveBest()} is called.
030 * @param solution source solution
031 */
032 public void bestSaved(Solution solution);
033
034 /** Called by the solution when method {@link Solution#restoreBest()} is called.
035 * @param solution source solution
036 */
037 public void bestRestored(Solution solution);
038 }