public void appendRecentLocation(String location) {
   if (StringUtils.isBlank(location) == true) {
     return;
   }
   ensureRecentLocations();
   recentLocations.setMaxSize(
       MAX_RECENT); // Needed, because max size will be set via xstream deserialization.
   recentLocations.append(location);
 }
 public void appendRecentTask(Integer taskId) {
   if (taskId == null) {
     return;
   }
   ensureRecentTasks();
   recentTasks.setMaxSize(
       MAX_RECENT); // Needed, because max size will be set via xstream deserialization.
   recentTasks.append(taskId);
 }
 public void init(List<TimesheetDO> list) {
   if (CollectionUtils.isNotEmpty(list) == true) {
     ensureRecents();
     ensureRecentTasks();
     for (TimesheetDO timesheet : list) {
       TimesheetPrefEntry prefEntry = new TimesheetPrefEntry(timesheet);
       recents.addOnly(prefEntry);
       if (timesheet.getId() == null) {
         return;
       }
       recentTasks.addOnly(timesheet.getTaskId());
     }
   }
 }
 public void initLocations(Collection<String> locations) {
   if (CollectionUtils.isNotEmpty(locations) == true) {
     ensureRecentLocations();
     for (String location : locations) {
       if (StringUtils.isBlank(location) == true) {
         return;
       }
       recentLocations.addOnly(location);
     }
   }
 }
 public List<TimesheetPrefEntry> getRecents() {
   if (recents == null) {
     return null;
   }
   return recents.getRecents();
 }
 public void appendRecentEntry(TimesheetPrefEntry entry) {
   ensureRecents();
   recents.setMaxSize(MAX_RECENT); // Needed, because size will be set via xstream deserialization.
   recents.append(entry);
 }
 public TimesheetPrefEntry getRecentEntry(Integer pos) {
   ensureRecents();
   return recents.get(pos);
 }
 public List<String> getRecentLocations() {
   if (recentLocations == null) {
     return null;
   }
   return recentLocations.getRecents();
 }
 public List<Integer> getRecentTasks() {
   if (recentTasks == null) {
     return null;
   }
   return recentTasks.getRecents();
 }
 public Integer getRecentTask(Integer pos) {
   ensureRecentTasks();
   return recentTasks.get(pos);
 }