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