package com.iesebre.dam2.roger.todos;

import com.google.gson.Gson;

/**
 * Created by roger on 13/11/15.
 */
public class TodoItem {

    private String name;
    private boolean done;
    private int priority;

    public TodoItem{
        this.name="";
        this.done = false;
        this.priority = 1;

    }

    public TodoItem(String name, boolean done, int priority) {
        this.name = name;
        this.done = done;
        this.priority = priority;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isDone() {
        return done;
    }

    public void setDone(boolean done) {
        this.done = done;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    @override
    public String toString(){
        return "[name: "+ name + ", done:" + done + ", priority:" + priority +"]";
    }

    public String serializable(){
        Gson gson = new Gson();
        return gson.toJson(this);

    }
}

@@ -225,16 +225,18 @@
 TodoItem
+()
 %7B%0A      
@@ -883,17 +883,17 @@
 %7D%0A%0A    @
-o
+O
 verride%0A

Resolve Proble Override