Slide 33
Slide 33 text
@TTGonda
collectiveidea.com
public final class User {
@NotNull
private final String firstName;
@Nullable
private String lastName;
public User(@NotNull String firstName, @Nullable String lastName) {
Intrinsics.checkParameterIsNotNull(firstName, "firstName");
super();
this.firstName = firstName;
this.lastName = lastName;
}
@NotNull
public final String getFirstName() {
return this.firstName;
}
@Nullable
public final String getLastName() {
return this.lastName;
}
public final void setLastName(@Nullable String var1) {
this.lastName = var1;
}
@NotNull
public final String component1() {
return this.firstName;
}
@Nullable
public final String component2() {
return this.lastName;
}
@NotNull
public final User copy(@NotNull String firstName, @Nullable String lastName) {
Intrinsics.checkParameterIsNotNull(firstName, "firstName");
return new User(firstName, lastName);
}
// $FF: synthetic method
// $FF: bridge method
@NotNull
public static User copy$default(User var0, String var1, String var2, int var3, Object var4) {
if((var3 & 1) != 0) {
var1 = var0.firstName;
}
if((var3 & 2) != 0) {
var2 = var0.lastName;
}
return var0.copy(var1, var2);
}
public String toString() {
return "User(firstName=" + this.firstName + ", lastName=" + this.lastName + ")";
}
public int hashCode() {
return (this.firstName != null?this.firstName.hashCode():0) * 31 + (this.lastName != null?this.lastName.hashCode():0);
}
public boolean equals(Object var1) {
if(this != var1) {
if(var1 instanceof User) {
User var2 = (User)var1;
if(Intrinsics.areEqual(this.firstName, var2.firstName) && Intrinsics.areEqual(this.lastName, var2.lastName)) {
return true;
}
}
return false;
} else {
return true;
}
}
}