@Test public void shouldReturnEntriesForSearch() throws Exception { Entry<?> entry1 = new Entry<>("xxxAAA"); Entry<?> entry2 = new Entry<>("AAAxXx"); Entry<?> entry3 = new Entry<>("AAxXXAAA"); Entry<?> entryA = new Entry<>("ttTAAA"); Entry<?> entryB = new Entry<>("AAATTt"); Entry<?> entryC = new Entry<>("AAAtttAAA"); entry1.setCalendar(calendar); entryA.setCalendar(calendar); entry2.setCalendar(calendar); entryB.setCalendar(calendar); entry3.setCalendar(calendar); entryC.setCalendar(calendar); List<Entry<?>> entries = calendar.findEntries("xxx"); assertThat(entries.size(), is(equalTo(3))); assertThat(entries.contains(entry1), is(true)); assertThat(entries.contains(entry2), is(true)); assertThat(entries.contains(entry3), is(true)); assertThat(entries.contains(entryA), is(false)); assertThat(entries.contains(entryB), is(false)); assertThat(entries.contains(entryC), is(false)); }
public final Map<LocalDate, List<Entry<?>>> findEntries(LocalDate startDate, LocalDate endDate, ZoneId zoneId) { fireEvents = false; Map<LocalDate, List<Entry<?>>> result; try { result = doGetEntries(startDate, endDate, zoneId); } finally { fireEvents = true; } return result; }
Calendar implements EventTarget { public final Map<LocalDate, List<Entry<?>>> findEntries(LocalDate startDate, LocalDate endDate, ZoneId zoneId) { fireEvents = false; Map<LocalDate, List<Entry<?>>> result; try { result = doGetEntries(startDate, endDate, zoneId); } finally { fireEvents = true; } return result; } }
Calendar implements EventTarget { public final Map<LocalDate, List<Entry<?>>> findEntries(LocalDate startDate, LocalDate endDate, ZoneId zoneId) { fireEvents = false; Map<LocalDate, List<Entry<?>>> result; try { result = doGetEntries(startDate, endDate, zoneId); } finally { fireEvents = true; } return result; } Calendar();  Calendar(String name); }
Calendar implements EventTarget { public final Map<LocalDate, List<Entry<?>>> findEntries(LocalDate startDate, LocalDate endDate, ZoneId zoneId) { fireEvents = false; Map<LocalDate, List<Entry<?>>> result; try { result = doGetEntries(startDate, endDate, zoneId); } finally { fireEvents = true; } return result; } Calendar();  Calendar(String name); final Instant getEarliestTimeUsed(); final Instant getLatestTimeUsed(); final void startBatchUpdates(); final void stopBatchUpdates(); final Map<LocalDate, List<Entry<?>>> findEntries(LocalDate startDate, LocalDate endDate, ZoneId zoneId); final ObjectProperty<Duration> lookAheadDurationProperty(); final void setLookAheadDuration(Duration duration); final Duration getLookAheadDuration(); final ObjectProperty<Duration> lookBackDurationProperty(); final void setLookBackDuration(Duration duration); final Duration getLookBackDuration(); List<Entry<?>> findEntries(String searchText); final void clear(); final void addEntry(Entry<?> entry); final void addEntries(Entry<?>... entries); final void addEntries(Collection<Entry<?>> entries); final void addEntries(Iterator<Entry<?>> entries); final void addEntries(Iterable<Entry<?>> entries); final void removeEntry(Entry<?> entry); final void removeEntries(Entry<?>... entries); final void removeEntries(Collection<Entry<?>> entries); final void removeEntries(Iterator<Entry<?>> entries); final void removeEntries(Iterable<Entry<?>> entries); final StringProperty nameProperty(); final void setName(String name); final String getName(); final StringProperty shortNameProperty(); final void setShortName(String name); final String getShortName(); final StringProperty styleProperty(); final void setStyle(Style style); final void setStyle(String stylePrefix); final String getStyle(); final BooleanProperty readOnlyProperty(); final boolean isReadOnly(); final void setReadOnly(boolean readOnly); final void addEventHandler(EventHandler<CalendarEvent> l); final void removeEventHandler(EventHandler<CalendarEvent> l); final void fireEvent(CalendarEvent evt); @Override final EventDispatchChain buildEventDispatchChain(EventDispatchChain givenTail); @Override String toString(); }
Calendar implements EventTarget { public final Map<LocalDate, List<Entry<?>>> findEntries(LocalDate startDate, LocalDate endDate, ZoneId zoneId) { fireEvents = false; Map<LocalDate, List<Entry<?>>> result; try { result = doGetEntries(startDate, endDate, zoneId); } finally { fireEvents = true; } return result; } Calendar();  Calendar(String name); final Instant getEarliestTimeUsed(); final Instant getLatestTimeUsed(); final void startBatchUpdates(); final void stopBatchUpdates(); final Map<LocalDate, List<Entry<?>>> findEntries(LocalDate startDate, LocalDate endDate, ZoneId zoneId); final ObjectProperty<Duration> lookAheadDurationProperty(); final void setLookAheadDuration(Duration duration); final Duration getLookAheadDuration(); final ObjectProperty<Duration> lookBackDurationProperty(); final void setLookBackDuration(Duration duration); final Duration getLookBackDuration(); List<Entry<?>> findEntries(String searchText); final void clear(); final void addEntry(Entry<?> entry); final void addEntries(Entry<?>... entries); final void addEntries(Collection<Entry<?>> entries); final void addEntries(Iterator<Entry<?>> entries); final void addEntries(Iterable<Entry<?>> entries); final void removeEntry(Entry<?> entry); final void removeEntries(Entry<?>... entries); final void removeEntries(Collection<Entry<?>> entries); final void removeEntries(Iterator<Entry<?>> entries); final void removeEntries(Iterable<Entry<?>> entries); final StringProperty nameProperty(); final void setName(String name); final String getName(); final StringProperty shortNameProperty(); final void setShortName(String name); final String getShortName(); final StringProperty styleProperty(); final void setStyle(Style style); final void setStyle(String stylePrefix); final String getStyle(); final BooleanProperty readOnlyProperty(); final boolean isReadOnly(); final void setReadOnly(boolean readOnly); final void addEventHandler(EventHandler<CalendarEvent> l); final void removeEventHandler(EventHandler<CalendarEvent> l); final void fireEvent(CalendarEvent evt); @Override final EventDispatchChain buildEventDispatchChain(EventDispatchChain givenTail); @Override String toString();  }