@@ -0,0 +1,2209 @@
+package com.andela.notelib.note;%0A%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collection;%0A%0Apublic class NoteList%3CT extends Note%3E extends ArrayList%3CT%3E %7B%0A%0A    public NoteList() %7B%0A        super();%0A    %7D%0A%0A    public T getNote(int index) %7B%0A        for (T t : this) %7B%0A            if (t.getId() == index)%0A                return t;%0A        %7D%0A        return null;%0A    %7D%0A%0A    public NoteList%3CT%3E getFolderNotes(int index) %7B%0A        NoteList%3CT%3E ts = new NoteList%3C%3E();%0A        for (T t : this) %7B%0A            if (t.getFolderId() == index)%0A                ts.add(t);%0A        %7D%0A        return ts;%0A    %7D%0A%0A    public void updateNote(T element) %7B%0A        int oldIndex = 0;%0A        for (T t : this) %7B%0A            if (t.getId() == element.getId()) %7B%0A                this.set(oldIndex, element);%0A                break;%0A            %7D%0A            oldIndex++;%0A        %7D%0A    %7D%0A%0A    public boolean containsNote(T element) %7B%0A        for (T t : this) %7B%0A            if (t.getId() == element.getId())%0A                return true;%0A        %7D%0A        return false;%0A    %7D%0A%0A    public boolean addNote(T t) %7B%0A        return this.add(t);%0A    %7D%0A%0A    public void addOrderedNote(T t) %7B%0A        this.add(0, t);%0A    %7D%0A%0A    public boolean removeNote(T element) %7B%0A        for (T t : this) %7B%0A            if (t.getId() == element.getId())%0A                return remove(t);%0A        %7D%0A        return false;%0A    %7D%0A%0A    public void removeFolderNotes(int index) %7B%0A        for (T t : this) %7B%0A            if (t.getFolderId() == index)%0A                remove(t);%0A        %7D%0A    %7D%0A%0A    public boolean containsAllNote(Collection%3CT%3E elements) %7B%0A        boolean flag = false;%0A        for (T t : elements) %7B%0A            flag = containsNote(t);%0A        %7D%0A        return flag;%0A    %7D%0A%0A    public boolean addAllNote(Collection%3C? extends T%3E c) %7B%0A        boolean flag = false;%0A        for (T t : c)%0A            flag = addNote(t);%0A        return flag;%0A    %7D%0A%0A    public void addAllOrderedNote(Collection%3C? extends T%3E c) %7B%0A        for (T t : c)%0A            addOrderedNote(t);%0A    %7D%0A%0A    public boolean removeAllNote(Collection%3CT%3E elements) %7B%0A        boolean flag = false;%0A        for (T t : elements) %7B%0A            flag = removeNote(t);%0A        %7D%0A        return flag;%0A    %7D%0A%7D%0A

Add NoteList Class