/** * An empty period is one that consumes no time. * @return true if this period consumes no time, otherwise false */ public final boolean isEmpty() { return getStart().equals(getEnd()); }
/** * An empty period is one that consumes no time. * @return true if this period consumes no time, otherwise false */ public final boolean isEmpty() { return getStart().equals(getEnd()); }
/** * An empty period is one that consumes no time. * @return true if this period consumes no time, otherwise false */ public final boolean isEmpty() { return getStart().equals(getEnd()); }
/** * An empty period is one that consumes no time. * @return true if this period consumes no time, otherwise false */ public final boolean isEmpty() { return getStart().equals(getEnd()); }
/** * An empty period is one that consumes no time. * @return true if this period consumes no time, otherwise false */ public final boolean isEmpty() { return getStart().equals(getEnd()); }
/** * Returns a single occurrence of a recurring event. * @param date a date on which the occurence should occur * @return a single non-recurring event instance for the specified date, or null if the event doesn't * occur on the specified date * @throws IOException where an error occurs reading data * @throws URISyntaxException where an invalid URI is encountered * @throws ParseException where an error occurs parsing data */ public final VEvent getOccurrence(final Date date) throws IOException, URISyntaxException, ParseException { final PeriodList consumedTime = getConsumedTime(date, date); for (final Iterator i = consumedTime.iterator(); i.hasNext();) { final Period p = (Period) i.next(); if (p.getStart().equals(date)) { final VEvent occurrence = (VEvent) this.copy(); occurrence.getProperties().add(new RecurrenceId(date)); return occurrence; } } return null; }
/** * Returns a single occurrence of a recurring event. * @param date a date on which the occurence should occur * @return a single non-recurring event instance for the specified date, or null if the event doesn't * occur on the specified date * @throws IOException where an error occurs reading data * @throws URISyntaxException where an invalid URI is encountered * @throws ParseException where an error occurs parsing data */ public final VEvent getOccurrence(final Date date) throws IOException, URISyntaxException, ParseException { final PeriodList consumedTime = getConsumedTime(date, date); for (final Period p : consumedTime) { if (p.getStart().equals(date)) { final VEvent occurrence = (VEvent) this.copy(); occurrence.getProperties().add(new RecurrenceId(date)); return occurrence; } } return null; }
/** * Returns a single occurrence of a recurring event. * @param date a date on which the occurence should occur * @return a single non-recurring event instance for the specified date, or null if the event doesn't * occur on the specified date * @throws IOException where an error occurs reading data * @throws URISyntaxException where an invalid URI is encountered * @throws ParseException where an error occurs parsing data */ public final VEvent getOccurrence(final Date date) throws IOException, URISyntaxException, ParseException { final PeriodList consumedTime = getConsumedTime(date, date); for (final Period p : consumedTime) { if (p.getStart().equals(date)) { final VEvent occurrence = (VEvent) this.copy(); occurrence.getProperties().add(new RecurrenceId(date)); return occurrence; } } return null; }
/** * Returns a single occurrence of a recurring event. * @param date a date on which the occurence should occur * @return a single non-recurring event instance for the specified date, or null if the event doesn't * occur on the specified date * @throws IOException where an error occurs reading data * @throws URISyntaxException where an invalid URI is encountered * @throws ParseException where an error occurs parsing data */ public final VEvent getOccurrence(final Date date) throws IOException, URISyntaxException, ParseException { final PeriodList consumedTime = getConsumedTime(date, date); for (final Period p : consumedTime) { if (p.getStart().equals(date)) { final VEvent occurrence = (VEvent) this.copy(); occurrence.getProperties().add(new RecurrenceId(date)); return occurrence; } } return null; }
/** * Returns a single occurrence of a recurring event. * @param date a date on which the occurence should occur * @return a single non-recurring event instance for the specified date, or null if the event doesn't * occur on the specified date * @throws IOException where an error occurs reading data * @throws URISyntaxException where an invalid URI is encountered * @throws ParseException where an error occurs parsing data */ public final VEvent getOccurrence(final Date date) throws IOException, URISyntaxException, ParseException { final PeriodList consumedTime = getConsumedTime(date, date); for (final Period p : consumedTime) { if (p.getStart().equals(date)) { final VEvent occurrence = (VEvent) this.copy(); occurrence.getProperties().add(new RecurrenceId(date)); return occurrence; } } return null; }