AgentMotion implements Serializable, Cloneable { @Pure @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj != null && obj.getClass() == getClass()) { final AgentMotion other = (AgentMotion) obj; return other.getAngular() == getAngular() && other.getLinear().equals(getLinear()); } return false; } AgentMotion();  AgentMotion(AgentMotion outputToCopy);  AgentMotion(double angularMotion);  AgentMotion(double linearx, double lineary);  AgentMotion(double linearx, double lineary, double angularMotion);  AgentMotion(Vector2D<?, ?> linearMotion);  AgentMotion(Vector2D<?, ?> linearMotion, double angularMotion); @Pure @ScalaOperator("-") AgentMotion minus(AgentMotion motion); @Pure @ScalaOperator("-") AgentMotion minus(double motion); @Pure @ScalaOperator("-") AgentMotion minus(Vector2D<?, ?> motion); @Pure @ScalaOperator("+") AgentMotion plus(AgentMotion motion); @Pure @ScalaOperator("+") AgentMotion plus(double motion); @Pure @ScalaOperator("+") AgentMotion plus(Vector2D<?, ?> motion); @Pure @Override AgentMotion clone(); @Pure @Override boolean equals(Object obj); @Pure double getAngular(); @Pure Vector2D<?, ?> getLinear(); @Pure @Override int hashCode(); @Pure @XtextOperator("+=") void operator_add(AgentMotion motion); @Pure @XtextOperator("+=") void operator_add(double motion); @Pure @XtextOperator("+=") void operator_add(Vector2D<?, ?> motion); @Pure @XtextOperator("-") AgentMotion operator_minus(AgentMotion motion); @Pure @XtextOperator("-") AgentMotion operator_minus(double motion); @Pure @XtextOperator("-") AgentMotion operator_minus(Vector2D<?, ?> motion); @Pure @XtextOperator("+") AgentMotion operator_plus(AgentMotion motion); @Pure @XtextOperator("+") AgentMotion operator_plus(double motion); @Pure @XtextOperator("+") AgentMotion operator_plus(Vector2D<?, ?> motion); @Pure @XtextOperator("-=") void operator_remove(AgentMotion motion); @Pure @XtextOperator("-=") void operator_remove(double motion); @Pure @XtextOperator("-=") void operator_remove(Vector2D<?, ?> motion); void set(AgentMotion motionToCopy); void setAngular(AgentMotion motionToCopy); void setAngular(double angular); void setLinear(AgentMotion motionToCopy); void setLinear(double dx, double dy); void setLinear(Vector2D<?, ?> linear); @Pure @Override String toString();  }
@Test public void testEquals() { double x = getRandom().nextDouble(); double y = getRandom().nextDouble(); double r = getRandom().nextDouble(); AgentMotion m = new AgentMotion(x, y, r); AgentMotion clone = m.clone(); AgentMotion m2 = new AgentMotion(x, y, r); AgentMotion m3 = new AgentMotion(x, y, r + 1); assertTrue(clone.equals(m)); assertTrue(m.equals(clone)); assertTrue(m2.equals(m)); assertTrue(m.equals(m2)); assertFalse(m3.equals(m)); assertFalse(m.equals(m3)); }