Slide 26
Slide 26 text
XIFO
public static ImageUrl create(
String light,
String dark
) {
if (light == null) {
return null;
} else if (dark == null) {
return null;
} else {
return new ImageUrl(light, dark);
}
}
Java Kotlin (Auto Convert)
companion object {
fun create(
light: String?,
dark: String?
): ImageUrl? {
return if (light == null) {
null
} else if (dark == null) {
null
} else {
ImageUrl(light, dark)
}
}
}