Beispiel #1
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !(o instanceof AbstractEntity)) return false;

    AbstractEntity other = (AbstractEntity) o;
    if (this.getObjectId() == null) return false;
    else if (this.getObjectId() == other.getObjectId()) return true;

    return this.getObjectId().equals(other.getObjectId());
  }
Beispiel #2
0
 /** Add all parts of the car to the world. */
 public void addToWorld(World world) {
   super.addToWorld(world);
   world.addObject(rightFront);
   world.addObject(rightRear);
   world.addObject(leftFront);
   world.addObject(leftRear);
 }