Ejemplo n.º 1
0
  public void addEvent(LocalDate dt, Event e) {
    Years yr = Years.years(dt.getYear());
    Map<LocalDate, List<Event>> currEventMap = eventsMap.get(yr);
    if (currEventMap == null) {
      currEventMap = new TreeMap<LocalDate, List<Event>>();
    }

    List<Event> eventList = currEventMap.get(dt);
    if (eventList == null) {
      eventList = new ArrayList<Event>();
    }
    eventList.add(e);
    currEventMap.put(dt, eventList);
    eventsMap.put(yr, currEventMap);
  }
Ejemplo n.º 2
0
 protected void addLocation(Location location) {
   locations.add(location);
 }
 protected void setUp() {
   addressBookList.add(book1);
   addressBookList.add(book2);
   addressBookList.add(book3);
   addressBookList.add(book4);
 }