/** * @param user * @return * @throws java.text.ParseException @Desc This function populates the "classifiedDayVector" * variable of the com.post.parser.model.User class. It gives the total number of posts in the * specified day range which has been described in getDayCategory(int DayOfWeek) in this * class. */ public User setCategorizedDayToUser(User user) throws ParseException { int[] userDayVector = user.getClassifiedDayVector(); for (Posts posts : user.getUserPost()) { String date = posts.getDate(); int DayOfWeek = getDayOfWeek(date) - 1; // System.out.println("Day Of Week " + DayOfWeek); userDayVector[DayOfWeek] = userDayVector[DayOfWeek] + 1; } user.setClassifiedDayVector(userDayVector); return user; }