KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > saxon > expr > LastPositionFinder


1 package net.sf.saxon.expr;
2 import net.sf.saxon.om.SequenceIterator;
3 import net.sf.saxon.trans.XPathException;
4
5
6 /**
7 * A LastPositionFinder is an interface implemented by any SequenceIterator that is
8  * able to return the position of the last item in the sequence.
9 */

10
11 public interface LastPositionFinder extends SequenceIterator {
12
13     /**
14     * Get the last position (that is, the number of items in the sequence). This method is
15     * non-destructive: it does not change the state of the iterator.
16     * The result is undefined if the next() method of the iterator has already returned null.
17     */

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