if (this == object) { return true; } else if (object == null || getClass() != object.getClass()) { return false; } Terrain other = (Terrain)object; return other.getName().equals(name); }
if (this == object) { return true; } else if (object == null || getClass() != object.getClass()) { return false; } Terrain other = (Terrain)object; return this.type == other.type && this.level == other.level; }
     public boolean equals(Object object) {         if (this == object) {             return true;         } else if (object == null || getClass() != object.getClass()) {             return false;         }         Terrain other = (Terrain)object;         return other.getName().equals(name);     }