package com.placeholder.rich.todotreeprototype.model;

public class Item {
    private final String name;
    private boolean complete;

    public Item(String name) {
        this(name, false);
    }

    public Item(String name, boolean complete) {
        this.name = name;
        this.complete = complete;
    }

    public String getName() {
        return name;
    }

    public boolean isComplete() {
        return complete;
    }

    public boolean toggleComplete() {
        return complete = !complete;
    }

}

@@ -128,16 +128,71 @@
 omplete;
+%0A    private int nSubItems;%0A    private int nItemsLeft;
 %0A%0A    pu
@@ -240,16 +240,22 @@
 e, false
+, 0, 0
 );%0A    %7D
@@ -321,260 +321,661 @@
 this
-.name = name;%0A        this.complete = complete;%0A    %7D%0A%0A    public String getName() %7B%0A        return name;%0A    %7D%0A%0A    public boolean isComplete() %7B%0A        return complete;%0A    %7D%0A%0A    public boolean toggleComplete() %7B%0A        return complete = !complete
+(name, complete, 0, 0);%0A    %7D%0A%0A    public Item(String name, boolean complete, int nSubItems, int nItemsLeft) %7B%0A        this.name = name;%0A        this.complete = complete;%0A        this.nSubItems = nSubItems;%0A        this.nItemsLeft = nItemsLeft;%0A    %7D%0A%0A    public String getName() %7B%0A        return name;%0A    %7D%0A%0A    public boolean isComplete() %7B%0A        return complete;%0A    %7D%0A%0A    public boolean toggleComplete() %7B%0A        return complete = !complete;%0A    %7D%0A%0A    public int getNSubItems() %7B%0A        return nSubItems;%0A    %7D%0A%0A    public int getNItemsLeft() %7B%0A        return nItemsLeft;%0A    %7D%0A%0A    public boolean hasSubItems() %7B%0A        return nSubItems %3E 0
 ;%0A  

Add number of sub items to model