/** * Creates a new {@link Delay} instance and sets it to this {@link Event}. * * @param math the math expression for the new {@link Delay} * @return the new {@link Delay} instance. */ public Delay createDelay(ASTNode math) { Delay d = createDelay(); d.setMath(math); return d; }
/** * Creates a new {@link Delay} inside the last {@link Event} object created in * this {@link Model}, and returns a pointer to it. * <p> * The mechanism by which the last {@link Event} object in this model was * created is not significant. It could have been created in a variety of * ways, for example by using createEvent(). If no {@link Event} object exists * in this {@link Model} object, a new {@link Delay} is <em>not</em> created * and {@code null} is returned instead. * <p> * * @return the {@link Delay} object created */ public Delay createDelay() { return getLastElementOf(getListOfEvents()).createDelay(); }