/** * @param date a date to test for inclusion * @param inclusive indicates if the start and end of the period are included in the test * @return true if the specified date occurs within the current period * @deprecated use {@link Period#includes(Date, int)} instead. */ public final boolean includes(final Date date, final boolean inclusive) { if (inclusive) { return includes(date, INCLUSIVE_START | INCLUSIVE_END); } else { return includes(date, 0); } }
/** * @param date a date to test for inclusion * @param inclusive indicates if the start and end of the period are included in the test * @return true if the specified date occurs within the current period * @deprecated use {@link Period#includes(Date, int)} instead. */ public final boolean includes(final Date date, final boolean inclusive) { if (inclusive) { return includes(date, INCLUSIVE_START | INCLUSIVE_END); } else { return includes(date, 0); } }
/** * @param date a date to test for inclusion * @param inclusive indicates if the start and end of the period are included in the test * @return true if the specified date occurs within the current period * @deprecated use {@link Period#includes(Date, int)} instead. */ public final boolean includes(final Date date, final boolean inclusive) { if (inclusive) { return includes(date, INCLUSIVE_START | INCLUSIVE_END); } else { return includes(date, 0); } }
/** * @param date a date to test for inclusion * @param inclusive indicates if the start and end of the period are included in the test * @return true if the specified date occurs within the current period * @deprecated use {@link Period#includes(Date, int)} instead. */ public final boolean includes(final Date date, final boolean inclusive) { if (inclusive) { return includes(date, INCLUSIVE_START | INCLUSIVE_END); } else { return includes(date, 0); } }
/** * @param date a date to test for inclusion * @param inclusive indicates if the start and end of the period are included in the test * @return true if the specified date occurs within the current period * @deprecated use {@link Period#includes(Date, int)} instead. */ public final boolean includes(final Date date, final boolean inclusive) { if (inclusive) { return includes(date, INCLUSIVE_START | INCLUSIVE_END); } else { return includes(date, 0); } }
/** * date is before * date is during * date is after * date is at start * date is at end * @throws Exception */ public void testIncludes() { assertTrue(period.includes(expectedDate)); }
/** * */ public void testNotIncludes() { assertFalse(period.includes(expectedDate)); }
.map(p -> p.getDates()).flatMap(DateList::stream).filter(date -> period.includes(date)) .map(rdateTime -> new Period((DateTime) rdateTime, rDuration)).collect(Collectors.toList())); .map(p -> p.getDates()).flatMap(DateList::stream).filter(date -> period.includes(date)) .map(rdateDate -> new Period(new DateTime(rdateDate), rDuration)).collect(Collectors.toList()));
.map(p -> p.getDates()).flatMap(DateList::stream).filter(date -> period.includes(date)) .map(rdateTime -> new Period((DateTime) rdateTime, rDuration)).collect(Collectors.toList())); .map(p -> p.getDates()).flatMap(DateList::stream).filter(date -> period.includes(date)) .map(rdateDate -> new Period(new DateTime(rdateDate), rDuration)).collect(Collectors.toList()));
for (final Iterator j = rdate.getDates().iterator(); j.hasNext();) { final DateTime rdateTime = (DateTime) j.next(); if (period.includes(rdateTime)) { recurrenceSet.add(new Period(rdateTime, rDuration)); for (final Iterator j = rdate.getDates().iterator(); j.hasNext();) { final Date rdateDate = (Date) j.next(); if (period.includes(rdateDate)) { recurrenceSet.add(new Period(new DateTime(rdateDate), rDuration));