Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 //----------------------------------------------------------------------------
 // Copyright (C) 2003  Rafael H. Bordini, Jomi F. Hubner, et al.
 // 
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
 // version 2.1 of the License, or (at your option) any later version.
 // 
 // This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// 
// To contact the authors:
// http://www.inf.ufrgs.br/~bordini
// http://www.das.ufsc.br/~jomi
//----------------------------------------------------------------------------
package jason.stdlib;

Internal action: .drop_event(D).

Description: removes events D from the agent circumstance. This internal action simply removes all +!D entries (those for which .desire(D) would succeed) from the set of events only; this action is complementary to .drop_desire and .drop_intention, in case a goal is to be removed only from the set of events and not from the set of intentions. No event is produced as a consequence of dropping desires from the set of events.

Example:

  • .drop_event(go(X,Y)): removes events such as <+!go(1,3),_> from the set of events.

public class drop_event extends drop_desire {
    
    @Override
    public Object execute(TransitionSystem tsUnifier unTerm[] argsthrows Exception {
        checkArguments(args);
        dropEvt(ts.getC(), (Literal)args[0], un);
        return true;
    }
New to GrepCode? Check out our FAQ X