@Goal public class StampGoal { @GoalParameter protected IComponentIdentifier wp; @GoalParameter protected String text; public StampGoal(IComponentIdentifier wp, String text) { this.wp = wp; this.text = text; } }
/** * */ @Goal(excludemode=ExcludeMode.WhenFailed) public class TestGoal { @GoalParameter protected int[] elems = new int [3]; @GoalCreationCondition(beliefs="elems") public TestGoal(int[] elems) { this.elems = elems; } }
/** * */ @Goal(excludemode=ExcludeMode.WhenFailed) public class TestGoal { @GoalParameter protected String[] elems = new String[3]; @GoalTargetCondition(parameters="elems") public boolean checkTarget() { return "c".equals(elems[2]); } public void set(int idx, String val) { elems[idx] = val; System.out.println("set: "+idx+" "+val); } }
/** * Simple hello world goal. */ @Goal public class HelloGoal { /** The text. */ @GoalParameter protected String text; /** * Create a new goal whenever sayhello belief is changed. */ public HelloGoal(String text) { this.text = text; } }
/** * Procedural goal (no target condition) with * AND success turned on. All plans have to be * executed and one has to be passed. */ @Goal(orsuccess=false) public class TestGoal { @GoalParameter protected List<String> results = new ArrayList<String>(); @GoalResult protected void resultReceived(String res) { // System.out.println("rec: "+res); results.add(res); } @GoalResult protected List<String> getResult() { return results; } }
/** * Simple hello world goal. */ @Goal public class HelloGoal { /** The text. */ @GoalParameter protected String text; /** * Create a new goal whenever sayhello belief is changed. */ @GoalCreationCondition public HelloGoal(@Event("sayhello") String text) { // System.out.println("New HelloGoal: "+text); this.text = text; } }
public class ExternalGoal @GoalParameter protected int cnt;
public static class SomeGoal @GoalParameter protected int cnt;
@GoalParameter protected List<Double> results = new ArrayList<Double>();
@GoalParameter protected int cnt;
@Goal(recur=true, recurdelay=10000, unique=true) public class SellBook implements INegotiationGoal @GoalParameter protected Order order;
@Goal(recur=true, recurdelay=10000, unique=true) public class PurchaseBook implements INegotiationGoal @GoalParameter protected Order order;
/** * The translation goal. */ @Goal public class Translate { /** The english word. */ @GoalParameter protected String eword; /** The german word. */ @GoalResult protected String gword; /** * Create a new translate goal. */ public Translate(String eword) { this.eword = eword; } }
/** * The translation goal. */ @Goal//(retry=false) public class Translate { /** The english word. */ @GoalParameter protected String eword; /** The german word. */ @GoalResult protected String gword; /** * Create a new translate goal. */ public Translate(String eword) { this.eword = eword; } }
/** * The translation goal. */ @Goal public class Translate { /** The english word. */ @GoalParameter protected String eword; /** The german word. */ @GoalResult protected String gword; /** * Create a new translate goal. */ public Translate(String eword) { this.eword = eword; } }
/** * The translation goal. */ @Goal public class Translate { /** The english word. */ @GoalParameter protected String eword; /** The german word. */ @GoalResult protected String gword; /** * Create a new translate goal. */ public Translate(String eword) { this.eword = eword; } }
@GoalParameter protected String eword;
@Goal public class AGoal @GoalParameter @GoalResult protected String p;
@GoalParameter protected String eword;
@GoalParameter protected ISpaceObject disaster;