@@ -0,0 +1,1975 @@
+package com.example.habitrack;%0A%0Aimport java.util.Calendar;%0A%0Aimport java.util.ArrayList;%0A%0A/**%0A * Created by sshussai on 11/4/17.%0A */%0A%0Apublic class HabitTypeStateManager %7B%0A%0A    private static Integer habitTypeID;%0A%0A    public static HabitTypeStateManager htManager = new HabitTypeStateManager();%0A%0A    private Calendar cal = Calendar.getInstance();%0A%0A    private static final ArrayList%3CHabitType%3E ALL_HABITTYPES = new ArrayList%3CHabitType%3E();%0A    private static final ArrayList%3CHabitType%3E HABITTYPES_FOR_TODAY = new ArrayList%3CHabitType%3E();%0A%0A%0A    private HabitTypeStateManager()%7B%0A        this.habitTypeID = 0;%0A    %7D%0A%0A    public static HabitTypeStateManager getHTStateManager()%7B%0A        return htManager;%0A    %7D%0A%0A    public void calculateHabitsForToday()%7B%0A        this.HABITTYPES_FOR_TODAY.clear();%0A        for(Integer count = 0; count %3C ALL_HABITTYPES.size(); count++)%7B%0A            Calendar currCal = ALL_HABITTYPES.get(count).getStartDate();%0A            if(currCal.get(Calendar.DAY_OF_WEEK) == cal.get(Calendar.DAY_OF_WEEK))%7B%0A                HABITTYPES_FOR_TODAY.add(ALL_HABITTYPES.get(count));%0A            %7D%0A        %7D%0A    %7D%0A%0A    public void storeHabitType(HabitType ht)%7B%0A        ALL_HABITTYPES.add(ht);%0A    %7D%0A%0A    public HabitType getHabitType(Integer requestedID)%7B%0A        for(Integer count = 0; count %3C ALL_HABITTYPES.size(); count++)%7B%0A            if(ALL_HABITTYPES.get(count).getID() == requestedID)%7B%0A                return ALL_HABITTYPES.get(count);%0A            %7D%0A        %7D%0A        return null;%0A        //HabitType ht = new HabitType(-1);%0A        //return ht;%0A    %7D%0A%0A%0A    public void removeHabitType(Integer requestedID)%7B%0A        for(Integer count = 0; count %3C ALL_HABITTYPES.size(); count++)%7B%0A            if(ALL_HABITTYPES.get(count).getID() == requestedID)%7B%0A                ALL_HABITTYPES.remove(count);%0A            %7D%0A        %7D%0A    %7D%0A%0A    public Integer getHabitTypeID()%7B%0A        HabitTypeStateManager.habitTypeID++;%0A        return HabitTypeStateManager.habitTypeID;%0A    %7D%0A%7D%0A

add habittypemanager class version 1.0