001 package sysModel; 002 003 import model.ILambda; 004 import sysModel.env.AGlobalEnv; 005 import sysModel.fish.AFish; 006 007 /** 008 * Interface for a factory to create a notify lambda. 009 * 010 * @author Mathias Ricken 011 */ 012 public interface ICmdFactory { 013 /** 014 * Create a lambda that notifies all observers and sends them the lambda given as parameter. 015 * 016 * @param lambda lambda for the observers 017 * @return notify lambda 018 */ 019 public ILambda makeNotifyCmd(ILambda lambda); 020 021 /** 022 * Create a lambda that notifies all observers to check if they are at the specified location and, if so, remove 023 * themselves from the observer. 024 * 025 * @param env local environment at which fish should be deleted 026 * @return delete lambda 027 */ 028 public ILambda makeDeleteCmd(AGlobalEnv.ALocalEnv env); 029 030 /** 031 * Create a lambda that adds a new fish to the observable. 032 * 033 * @param fish fish to add 034 * @return add lambda 035 */ 036 public ILambda makeAddCmd(AFish fish); 037 }