mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-02-09 16:08:49 +01:00
convert Note model to kotlin
This commit is contained in:
parent
8227d5cc56
commit
ff8f075e5c
@ -1,52 +0,0 @@
|
||||
package com.simplemobiletools.notes.models;
|
||||
|
||||
public class Note {
|
||||
private int mId;
|
||||
private String mTitle;
|
||||
private String mValue;
|
||||
|
||||
public Note(int id, String title, String value) {
|
||||
mId = id;
|
||||
mTitle = title;
|
||||
mValue = value;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return mId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return mTitle;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return mValue;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
mId = id;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
mValue = value;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
mTitle = title;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o != null && this.toString().equals(o.toString());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Note {" +
|
||||
"id=" + getId() +
|
||||
", title=" + getTitle() +
|
||||
", value=" + getValue() +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.simplemobiletools.notes.models
|
||||
|
||||
class Note(var id: Int, var title: String, var value: String) {
|
||||
|
||||
override fun equals(o: Any?) = o != null && this.toString() == o.toString()
|
||||
|
||||
override fun toString() = "Note {id=$id, title=$title, value=$value}"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user