68 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
| /*
 | |
|  * Nextcloud Notes Tutorial for Android
 | |
|  *
 | |
|  * @copyright Copyright (c) 2020 John Doe <john@doe.com>
 | |
|  * @author John Doe <john@doe.com>
 | |
|  *
 | |
|  * This program is free software: you can redistribute it and/or modify
 | |
|  * it under the terms of the GNU General Public License as published by
 | |
|  * the Free Software Foundation, either version 3 of the License, or
 | |
|  * (at your option) any later version.
 | |
|  *
 | |
|  * This program is distributed in the hope that it will be useful,
 | |
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | |
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | |
|  * GNU General Public License for more details.
 | |
|  *
 | |
|  * You should have received a copy of the GNU General Public License
 | |
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |
|  */
 | |
| 
 | |
| package it.danieleverducci.nextcloudmaps.model;
 | |
| 
 | |
| import com.google.gson.annotations.Expose;
 | |
| import com.google.gson.annotations.SerializedName;
 | |
| 
 | |
| import java.io.Serializable;
 | |
| import java.util.Comparator;
 | |
| 
 | |
| public class Note implements Serializable {
 | |
|     @Expose
 | |
|     @SerializedName("id") private int id;
 | |
| 
 | |
|     @Expose
 | |
|     @SerializedName("title") private String title;
 | |
| 
 | |
|     @Expose
 | |
|     @SerializedName("content") private String content;
 | |
| 
 | |
|     public int getId() {
 | |
|         return id;
 | |
|     }
 | |
| 
 | |
|     public void setId(int id) {
 | |
|         this.id = id;
 | |
|     }
 | |
| 
 | |
|     public String getTitle() {
 | |
|         return title;
 | |
|     }
 | |
| 
 | |
|     public void setTitle(String title) {
 | |
|         this.title = title;
 | |
|     }
 | |
| 
 | |
|     public String getContent() {
 | |
|         return content;
 | |
|     }
 | |
| 
 | |
|     public void setContent(String content) {
 | |
|         this.content = content;
 | |
|     }
 | |
| 
 | |
|     public static Comparator<Note> ByTitleAZ = (note, t1) -> note.title.compareTo(t1.title);
 | |
| 
 | |
|     public static Comparator<Note> ByLastCreated = (note, t1) -> t1.id - note.id;
 | |
| 
 | |
| }
 |