@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()); }
/** 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); }