Migrating ThirdPartyInfo class to kotlin (#2699)

* Migrating ThirdPartyINfo class to kotlin

* Removing null allowance in strings
This commit is contained in:
PRATHAMESH BHAGAT
2025-09-23 22:00:00 +05:30
committed by GitHub
parent 52b62b1075
commit d047c38bc2
2 changed files with 23 additions and 29 deletions

View File

@@ -1,29 +0,0 @@
package protect.card_locker;
public class ThirdPartyInfo {
private final String mName;
private final String mUrl;
private final String mLicense;
public ThirdPartyInfo(String name, String url, String license) {
mName = name;
mUrl = url;
mLicense = license;
}
public String name() {
return mName;
}
public String url() {
return mUrl;
}
public String license() {
return mLicense;
}
public String toHtml() {
return String.format("<a href=\"%s\">%s</a> (%s)", url(), name(), license());
}
}

View File

@@ -0,0 +1,23 @@
package protect.card_locker
class ThirdPartyInfo(
private val mName: String,
private val mUrl: String,
private val mLicense: String
) {
fun name(): String {
return mName
}
fun url(): String {
return mUrl
}
fun license(): String {
return mLicense
}
fun toHtml(): String {
return String.format("<a href=\"%s\">%s</a> (%s)", url(), name(), license())
}
}