01: /*
02: * Copyright 2006 Day Management AG, Switzerland. All rights reserved.
03: */
04: package javax.jcr.observation;
05:
06: import javax.jcr.RangeIterator;
07: import java.util.Calendar;
08:
09: /**
10: * Allows easy iteration through a list of <code>Event</code>s
11: * with <code>nextEvent</code> as well as a <code>skip</code> method inherited from
12: * <code>RangeIterator</code>.
13: *
14: */
15: public interface EventIterator extends RangeIterator {
16:
17: /**
18: * Returns the next <code>Event</code> in the iteration.
19: *
20: * @return the next <code>Event</code> in the iteration.
21: * @throws java.util.NoSuchElementException if iteration has no more <code>Event</code>s.
22: */
23: public Event nextEvent();
24:
25: /**
26: * Returns the date associated with this event iterator, or <code>null</code>.
27: * <p/>
28: * The date is required to be non-null for event iterators obtained through
29: * an {@link EventJournal}.
30: * @return the date associated with this event iterator, or <code>null</code>.
31: * @since JCR 2.0
32: */
33: public Calendar getDate();
34: }
|