View Javadoc

1   package cz.cuni.amis.pogamut.base.agent.state;
2   
3   import cz.cuni.amis.pogamut.base.agent.state.level0.IAgentState;
4   import cz.cuni.amis.utils.flag.Flag;
5   import cz.cuni.amis.utils.flag.WaitForFlagChange;
6   
7   public class WaitForAgentStateChange extends WaitForFlagChange<IAgentState> {
8   	
9   	public WaitForAgentStateChange(Flag<IAgentState> flag, final Class<? extends IAgentState> agentState) {
10  		super(flag, new IAccept<IAgentState>() {
11  
12  			@Override
13  			public boolean accept(IAgentState flagValue) {
14  				return agentState.isAssignableFrom(flagValue.getClass());
15  			}
16  			
17  		});
18  	}
19  	
20  }