- package com.example.citrusclient.models;
-
- import java.util.List;
-
- public class Todo extends Task{
-
-
- boolean check;
- int year;
- int month;
- int day;
- Integer todoId;
-
- //コンストラクタ
- public Todo(String title, boolean check, int year, int month, int day, Integer tid, Integer bid) {
- this.title = title;
- this.check = check;
- this.year = year;
- this.month = month;
- this.day = day;
- todoId = tid;
- this.bookId = bid;
- }
-
- public Todo(){}
-
-
-
- //セッター
- public void setCheck(boolean check) {this.check = check;}
- public void setYear(int year) {this.year = year;}
- public void setMonth(int month) {this.month = month;}
- public void setDay(int day) {this.day = day;}
- public void setTodoId(Integer tid) {this.todoId = tid;}
-
- //ゲッター
-
- public boolean getCheck() {return check;}
-
- public int getYear() {return year;}
-
- public int getMonth() {return month;}
-
- public int getDay() {return day;}
-
- public Integer getTodoId() {
- return todoId;
- }
-
- public boolean containsTodo(List<Todo> todoList){
- for(Todo todo : todoList) {
- if(todo.bookId == this.bookId && todo.year == this.year && todo.month == this.month && todo.day == this.day && todo.todoId == this.todoId) {
- return true;
- }
- }
- return false;
- }
- }