Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class MyAbstractAgent extends Agent
- implements java.io.Serializable {
- private static final long serialVersionUID = 1L;
- /**
- * Constructor in form required for an Agent subclass to be instantiated and for
- * superclass instantiation (as gleaned from looking at Java source of
- * visually-created Agents)
- */
- public MyAbstractAgent(Engine engine,
- Agent owner,
- AgentList<? extends MyAbstractAgent> collection) {
- super (engine, owner, collection);
- }
- /*
- * Simple constructor as now included in all AnyLogic 7 generated Agent code. Don't
- * understand when this would be invoked cf. the others so let's assert that we
- * don't think it should
- */
- public MyAbstractAgent() {
- throw new AssertionError("Not expecting simple constructor to be used!");
- }
- // Using package visibility (the default for GUI-designed functions)
- abstract specialAbstractFunction();
- }
- throw new IllegalStateException("Subclass must implement specialAbstractMethod()");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement