001 package sysModel.env;
002
003 import sysModel.fish.AFish;
004
005 /**
006 * Class containing parameters that the fish passes back to the lambda on an update.
007 *
008 * @author Mathias Ricken
009 */
010 public class FishApplyParams {
011 /// the fish being passed back
012 private AFish _fish;
013 /// the fish's local environment
014 private AGlobalEnv.ALocalEnv _localEnv;
015
016 /**
017 * Construct new parameters.
018 *
019 * @param f fish
020 * @param le local environment
021 */
022 public FishApplyParams(AFish f, AGlobalEnv.ALocalEnv le) {
023 _fish = f;
024 _localEnv = le;
025 }
026
027 /**
028 * Get the fish.
029 *
030 * @return fish
031 */
032 public AFish fish() {
033 return _fish;
034 }
035
036 /**
037 * Get the local environment.
038 *
039 * @return local environment
040 */
041 public AGlobalEnv.ALocalEnv localEnv() {
042 return _localEnv;
043 }
044
045 /**
046 * Return the string representation of the fish-local environment pair.
047 *
048 * @return string representation
049 */
050 public String toString() {
051 return _fish.getClass().getName() + ' ' + _localEnv;
052 }
053 }