Switched to lombok to replace boilerplate methods for Comment class

This commit is contained in:
Clayton Hickey 2020-05-28 19:28:48 -04:00
parent 1a9c087389
commit e88706e500

View file

@ -5,10 +5,11 @@ import android.util.Log;
import org.json.JSONException;
import org.json.JSONObject;
import androidx.annotation.NonNull;
import lombok.Data;
@Data
public class Comment {
private String channelName, text, id, parentId;
private final String channelName, text, id, parentId;
public Comment(String channelName, String text, String id, String parentId) {
this.channelName = channelName;
@ -36,18 +37,4 @@ public class Comment {
return null;
}
}
@NonNull
@Override
public String toString() {
return "Channel: " + channelName + " text: " + text + " id: " + id + " parentId: " + parentId;
}
public String getText() {
return text;
}
public String getChannelName() {
return channelName;
}
}