From 1e69c51fec28c61030808111e558b31e7a9ab1e1 Mon Sep 17 00:00:00 2001 From: GoFly233 Date: Thu, 13 Aug 2020 19:45:27 +0800 Subject: [PATCH] =?UTF-8?q?refactor(CollectDataBean.java):=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20Kotlin=20=E9=87=8D=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 重命名 .java to .kt --- .../tieba/api/models/CollectDataBean.java | 42 ------------------- .../tieba/api/models/CollectDataBean.kt | 30 +++++++++++++ .../{ForumPageBean.java => ForumPageBean.kt} | 0 3 files changed, 30 insertions(+), 42 deletions(-) delete mode 100644 app/src/main/java/com/huanchengfly/tieba/api/models/CollectDataBean.java create mode 100644 app/src/main/java/com/huanchengfly/tieba/api/models/CollectDataBean.kt rename app/src/main/java/com/huanchengfly/tieba/api/models/{ForumPageBean.java => ForumPageBean.kt} (100%) diff --git a/app/src/main/java/com/huanchengfly/tieba/api/models/CollectDataBean.java b/app/src/main/java/com/huanchengfly/tieba/api/models/CollectDataBean.java deleted file mode 100644 index 21660df4..00000000 --- a/app/src/main/java/com/huanchengfly/tieba/api/models/CollectDataBean.java +++ /dev/null @@ -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); - } -} diff --git a/app/src/main/java/com/huanchengfly/tieba/api/models/CollectDataBean.kt b/app/src/main/java/com/huanchengfly/tieba/api/models/CollectDataBean.kt new file mode 100644 index 00000000..3012547c --- /dev/null +++ b/app/src/main/java/com/huanchengfly/tieba/api/models/CollectDataBean.kt @@ -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) + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/huanchengfly/tieba/api/models/ForumPageBean.java b/app/src/main/java/com/huanchengfly/tieba/api/models/ForumPageBean.kt similarity index 100% rename from app/src/main/java/com/huanchengfly/tieba/api/models/ForumPageBean.java rename to app/src/main/java/com/huanchengfly/tieba/api/models/ForumPageBean.kt