KickJava   Java API By Example, From Geeks To Geeks.

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


1 package net.sf.saxon.om;
2
3
4 /**
5  * A SequenceIterator is used to iterate over a sequence. An AtomizableIterator
6  * is a SequenceIterator that can be asked to atomize any nodes encountered
7  * in this sequence. It does not actually have to perform this atomization, it merely
8  * has to accept the request. If atomization is requested, the iterator can atomize
9  * some, all, or none of the nodes it encounters at its discretion: any that are
10  * not atomized will be handled by the containing Atomizer.
11  *
12  * This mechanism provides an optimization, allowing atomization to occur at a lower
13  * level of the system, which avoids the overheads of node creation in some tree
14  * models.
15  */

16
17 public interface AtomizableIterator extends SequenceIterator {
18
19     /**
20      * Indicate that any nodes returned in the sequence will be atomized. This
21      * means that if it wishes to do so, the implementation can return the typed
22      * values of the nodes rather than the nodes themselves. The implementation
23      * is free to ignore this hint.
24      * @param atomizing true if the caller of this iterator will atomize any
25      * nodes that are returned, and is therefore willing to accept the typed
26      * value of the nodes instead of the nodes themselves.
27      */

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