Slide 65
Slide 65 text
data class Item(val id: String, val name: String, val description: String) : Parcelable
public final class Item {
@NotNull
private final String id;
@NotNull
private final String name;
@NotNull
private final String description;
@NotNull
public final String getId() {
return this.id;
}
@NotNull
public final String getName() {
return this.name;
}
@NotNull
public final String getDescription() {
return this.description;
}
public Item(@NotNull String id, @NotNull String name, @NotNull String description) {
Intrinsics.checkParameterIsNotNull(id, "id");
Intrinsics.checkParameterIsNotNull(name, "name");
Intrinsics.checkParameterIsNotNull(description, "description");
super();
this.id = id;
this.name = name;
this.description = description;
}
@NotNull
public final String component1() {
return this.id;
}
@NotNull
public final String component2() {
return this.name;
}
@NotNull
public final String component3() {
return this.description;
}
@NotNull
public final Item copy(@NotNull String id, @NotNull String name, @NotNull String description) {
Intrinsics.checkParameterIsNotNull(id, "id");
Intrinsics.checkParameterIsNotNull(name, "name");
Intrinsics.checkParameterIsNotNull(description, "description");
return new Item(id, name, description);
}
// $FF: synthetic method
// $FF: bridge method
@NotNull
public static Item copy$default(Item var0, String var1, String var2, String var3, int var4, Object var5) {
if ((var4 & 1) != 0) {
var1 = var0.id;
}
if ((var4 & 2) != 0) {
var2 = var0.name;
}
if ((var4 & 4) != 0) {
var3 = var0.description;
}
return var0.copy(var1, var2, var3);
}
public String toString() {
return "Item(id=" + this.id + ", name=" + this.name + ", description=" + this.description + ")";
}
public int hashCode() {
return ((this.id != null ? this.id.hashCode() : 0) * 31 + (this.name != null ? this.name.hashCode() : 0)) * 31 + (this.description != null ? this.description.hashCode() : 0);
}
public boolean equals(Object var1) {
if (this != var1) {
if (var1 instanceof Item) {
Item var2 = (Item)var1;
if (Intrinsics.areEqual(this.id, var2.id) && Intrinsics.areEqual(this.name, var2.name) && Intrinsics.areEqual(this.description, var2.description)) {
return true;
}
}
return false;
} else {
return true;
val(id, name, description) = fooItem()
fun fooItem(): Item {
return Item("id", "name", "description")
}