refactor(CollectDataBean.java): 使用 Kotlin 重写

重命名 .java to .kt
This commit is contained in:
GoFly233 2020-08-13 19:45:27 +08:00 committed by HuanChengFly
parent 3482cf6131
commit 1e69c51fec
3 changed files with 30 additions and 42 deletions

View File

@ -1,42 +0,0 @@
package com.huanchengfly.tieba.api.models;
import com.huanchengfly.utils.GsonUtil;
public class CollectDataBean {
public String pid;
public String tid;
public String status;
public String type;
public CollectDataBean(String pid, String tid, String status, String type) {
this.pid = pid;
this.tid = tid;
this.status = status;
this.type = type;
}
public CollectDataBean setPid(String pid) {
this.pid = pid;
return this;
}
public CollectDataBean setStatus(String status) {
this.status = status;
return this;
}
public CollectDataBean setTid(String tid) {
this.tid = tid;
return this;
}
public CollectDataBean setType(String type) {
this.type = type;
return this;
}
@Override
public String toString() {
return GsonUtil.getGson().toJson(this);
}
}

View File

@ -0,0 +1,30 @@
package com.huanchengfly.tieba.api.models
import com.huanchengfly.utils.GsonUtil
class CollectDataBean(var pid: String, var tid: String, var status: String, var type: String) {
fun setPid(pid: String): CollectDataBean {
this.pid = pid
return this
}
fun setStatus(status: String): CollectDataBean {
this.status = status
return this
}
fun setTid(tid: String): CollectDataBean {
this.tid = tid
return this
}
fun setType(type: String): CollectDataBean {
this.type = type
return this
}
override fun toString(): String {
return GsonUtil.getGson().toJson(this)
}
}