01: /*
02: *
03: * Copyright (c) 2002 Adrian Price. All rights reserved.
04: */
05:
06: package org.wfmc.wapi;
07:
08: import java.util.Iterator;
09:
10: /**
11: * Special iterator that can return an element count. The sub-interfaces all
12: * provide typesafe <code>tsNext()</code> methods to access the elements of the
13: * iteration.
14: * @author Adrian Price
15: */
16: public interface WMIterator extends Iterator {
17: /**
18: * Returns the number of items that matched the query criteria. N.B. This
19: * iterator class is used to return either the objects themselves or a count
20: * of the total number of objects. In the former case the count value may
21: * be unknown, in which case the method returns -1.
22: * @return Iteration count.
23: */
24: int getCount();
25: }
|