public static DynamicEntityException illegalMergeOfManagedInstance(DynamicEntity entity) { return new DynamicEntityException( "Illegal Merge attempt of: " + entity + " of type: " + entity.getClass()); }
// @ requires !initialized; // @ ensures position()[0] == the_position[0]; // @ ensures position()[1] == the_position[1]; // @ ensures orientation() == the_orientation; // @ ensures initialized; public void set_state(final double[] the_pos, final double the_ori) { super.set_state(the_pos, the_ori); my_initialized = true; }
/** * An helper method to set a property to an instance of {@link DynamicEntity}. * * @param tableEntity injected entity * @param jpaColumnName property name * @param value property value */ public static void setPropertyHelper( DynamicEntity tableEntity, String jpaColumnName, Object value) { tableEntity.setProperty(jpaColumnName, getEntityProperty(value)); }
public void update() { if (this.getVelocity().length() < 5) { alive = false; } super.update(); }