KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > saxon > om > LookaheadIterator


1 package net.sf.saxon.om;
2
3
4 /**
5  * A SequenceIterator is used to iterate over a sequence. A LookaheadIterator
6  * is one that supports a hasNext() method to determine if there are more nodes
7  * after the current node.
8  */

9
10 public interface LookaheadIterator extends SequenceIterator {
11
12     /**
13      * Determine whether there are more items to come. Note that this operation
14      * is stateless and it is not necessary (or usual) to call it before calling
15      * next(). It is used only when there is an explicit need to tell if we
16      * are at the last element.
17      *
18      * @return true if there are more items in the sequence
19      */

20
21     public boolean hasNext();
22
23
24 }
25
26
27
28 //
29
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
30
// you may not use this file except in compliance with the License. You may obtain a copy of the
31
// License at http://www.mozilla.org/MPL/
32
//
33
// Software distributed under the License is distributed on an "AS IS" basis,
34
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
35
// See the License for the specific language governing rights and limitations under the License.
36
//
37
// The Original Code is: all this file.
38
//
39
// The Initial Developer of the Original Code is Michael Kay
40
//
41
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
42
//
43
// Contributor(s): none.
44
//
45
Popular Tags