| package org.metaabm.gen.test; |
| |
| /** |
| * Basic Cell Java Implementation. |
| * |
| * Generated by metaabm system: May 13, 2009 11:53:51 AM PDT in project: org.metaabm.gen.repast.test (testing) */ |
| |
| import static org.junit.Assert.*; |
| |
| public class BasicCell { |
| |
| /** |
| * |
| */ |
| |
| private boolean goal = false; |
| /** |
| * |
| */ |
| |
| private boolean goal2 = false; |
| /** |
| * |
| */ |
| |
| private boolean goal3 = false; |
| /** |
| * Constructs a new Basic Cell. |
| */ |
| |
| public BasicCell() { |
| createUniqueID(); |
| } |
| |
| //todo, make this a useful value for evaluating compatibility of different versions of generated classes |
| private static final long serialVersionUID = 89989998L; |
| |
| private String uniqueID; |
| |
| public String getUID() { |
| return uniqueID; |
| } |
| |
| public void createUniqueID() { |
| uniqueID = org.apache.commons.lang.RandomStringUtils |
| .randomAlphanumeric(5); |
| } |
| |
| /** |
| * Clones the agent, ensuring that a unique id is assigned. |
| */ |
| public Object clone() { |
| try { |
| BasicCell clone = (BasicCell) super.clone(); |
| clone.createUniqueID(); |
| return clone; |
| } catch (Exception e) { |
| throw new RuntimeException("Unexpected cloning exception: " + e); |
| } |
| } |
| |
| @org.junit.Test |
| public void dummy() { |
| assertTrue(true); |
| } |
| |
| /** |
| * Most recent version. |
| */ |
| |
| private BasicMovementModel basicMovementModelList = null; |
| |
| /** |
| * Gets the Basic Movement Model property for . |
| * @return Most recent version. |
| */ |
| |
| public BasicMovementModel getBasicMovementModel() { |
| return basicMovementModelList; |
| } |
| |
| /** |
| * Sets the Basic Movement Model property for . |
| * Most recent version. |
| * @param _basicMovementModel the new Basic Movement Model value |
| */ |
| |
| public void setBasicMovementModel(BasicMovementModel _basicMovementModel) { |
| basicMovementModelList = _basicMovementModel; |
| } |
| |
| public double randomInRange(double minValue, double maxValue) { |
| return repast.simphony.random.RandomHelper.nextDoubleFromTo(minValue, |
| maxValue); |
| } |
| |
| public double randomToLimit(double maxValue) { |
| return repast.simphony.random.RandomHelper.nextDoubleFromTo(0.0, |
| maxValue); |
| } |
| |
| public int randomToLimit(int maxValue) { |
| return repast.simphony.random.RandomHelper.nextIntFromTo(0, maxValue); |
| } |
| |
| /** |
| * Gets the Goal property for Basic Cell. |
| * @return |
| */ |
| |
| @repast.simphony.parameter.Parameter(displayName = "Goal", usageName = "goal", defaultValue = "false") |
| public boolean isGoal() { |
| return goal; |
| } |
| |
| /** |
| * Sets the Goal property for Basic Cell. |
| * |
| * @param _goal the new Goal value |
| */ |
| |
| public void setGoal(boolean _goal) { |
| goal = _goal; |
| } |
| |
| /** |
| * Gets the Goal 2 property for Basic Cell. |
| * @return |
| */ |
| |
| @repast.simphony.parameter.Parameter(displayName = "Goal 2", usageName = "goal2", defaultValue = "false") |
| public boolean isGoal2() { |
| return goal2; |
| } |
| |
| /** |
| * Sets the Goal 2 property for Basic Cell. |
| * |
| * @param _goal2 the new Goal 2 value |
| */ |
| |
| public void setGoal2(boolean _goal2) { |
| goal2 = _goal2; |
| } |
| |
| /** |
| * Gets the Goal 3 property for Basic Cell. |
| * @return |
| */ |
| |
| @repast.simphony.parameter.Parameter(displayName = "Goal 3", usageName = "goal3", defaultValue = "false") |
| public boolean isGoal3() { |
| return goal3; |
| } |
| |
| /** |
| * Sets the Goal 3 property for Basic Cell. |
| * |
| * @param _goal3 the new Goal 3 value |
| */ |
| |
| public void setGoal3(boolean _goal3) { |
| goal3 = _goal3; |
| } |
| |
| } |