示例#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());
  }
示例#2
0
文件: Car.java 项目: embix/Tectonicus
 /** 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);
 }