01: package org.sakaiproject.component.osid.logging;
02:
03: /**
04: *
05: * @inheritDoc
06: *
07: */
08: public class EntryIterator implements org.osid.logging.EntryIterator {
09: private java.util.Vector vector = new java.util.Vector();
10: int i = 0;
11:
12: public EntryIterator(java.util.Vector vector)
13: throws org.osid.logging.LoggingException {
14: this .vector = vector;
15: }
16:
17: public boolean hasNextEntry()
18: throws org.osid.logging.LoggingException {
19: return i < vector.size();
20: }
21:
22: public org.osid.logging.Entry nextEntry()
23: throws org.osid.logging.LoggingException {
24: if (i < vector.size()) {
25: return (Entry) vector.elementAt(i++);
26: } else {
27: throw new org.osid.logging.LoggingException(
28: org.osid.logging.LoggingException.NO_MORE_ITERATOR_ELEMENTS);
29: }
30: }
31: }
|