001    package net.sf.cpsolver.ifs.model;
002    
003    /**
004     * IFS variable listener.
005     *
006     * @see Variable
007     *
008     * @version
009     * IFS 1.1 (Iterative Forward Search)<br>
010     * Copyright (C) 2006 Tomáš Müller<br>
011     * <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
012     * Lazenska 391, 76314 Zlin, Czech Republic<br>
013     * <br>
014     * This library is free software; you can redistribute it and/or
015     * modify it under the terms of the GNU Lesser General Public
016     * License as published by the Free Software Foundation; either
017     * version 2.1 of the License, or (at your option) any later version.
018     * <br><br>
019     * This library is distributed in the hope that it will be useful,
020     * but WITHOUT ANY WARRANTY; without even the implied warranty of
021     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
022     * Lesser General Public License for more details.
023     * <br><br>
024     * You should have received a copy of the GNU Lesser General Public
025     * License along with this library; if not, write to the Free Software
026     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
027     */
028    public interface VariableListener {
029        /** Called by the variable when a value is assigned to it
030         * @param iteration current iteration
031         * @param value assigned to the variable
032         */
033        public void variableAssigned(long iteration, Value value);
034    
035        /** Called by the variable when a value is unassigned from it
036         * @param iteration current iteration
037         * @param value unassigned from the variable
038         */
039        public void variableUnassigned(long iteration, Value value);
040    
041        /** Called by the variable when a value is permanently removed from its domain
042         * @param iteration current iteration
043         * @param value removed from the variable's domain
044         */
045        public void valueRemoved(long iteration, Value value);
046    }