mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-04-15 12:57:27 -04:00
Migrating ThirdPartyInfo class to kotlin (#2699)
* Migrating ThirdPartyINfo class to kotlin * Removing null allowance in strings
This commit is contained in:
committed by
GitHub
parent
52b62b1075
commit
d047c38bc2
@@ -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());
|
||||
}
|
||||
}
|
||||
23
app/src/main/java/protect/card_locker/ThirdPartyInfo.kt
Normal file
23
app/src/main/java/protect/card_locker/ThirdPartyInfo.kt
Normal 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())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user