01: /**
02: * Copyright 2007 Jens Dietrich Licensed under the Apache License, Version 2.0 (the "License");
03: * you may not use this file except in compliance with the License.
04: * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
05: * Unless required by applicable law or agreed to in writing, software distributed under the
06: * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
07: * either express or implied. See the License for the specific language governing permissions
08: * and limitations under the License.
09: */package nz.org.take.rt;
10:
11: import java.util.Iterator;
12:
13: /**
14: * Resource iterator.
15: * This is an iterator that can be closed. The close operation releases resources, e.g.
16: * closes database connections.
17: * Note that close(), next() and hasNext() may throw unchecked exceptions DerivationException.
18: * @see DerivationException
19: * @author <a href="http://www-ist.massey.ac.nz/JBDietrich/">Jens Dietrich</a>
20: */
21: public interface ResourceIterator<T> extends Iterator<T> {
22:
23: /**
24: * Close the iterator.
25: */
26: public void close();
27:
28: }
|