KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > dom > NodeListCache


1 /*
2  * Copyright 2001,2002,2004,2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.xerces.dom;
18
19 import java.io.Serializable JavaDoc;
20
21 /**
22  * This class is used, via a pool managed on CoreDocumentImpl, in ParentNode to
23  * improve performance of the NodeList accessors, getLength() and item(i).
24  *
25  * @xerces.internal
26  *
27  * @author Arnaud Le Hors, IBM
28  *
29  * @version $Id: NodeListCache.java,v 1.8 2005/03/22 03:38:16 mrglavas Exp $
30  */

31 class NodeListCache implements Serializable JavaDoc {
32
33     /** Serialization version. */
34     private static final long serialVersionUID = 3258135743263224377L;
35
36     /** Cached node list length. */
37     int fLength = -1;
38
39     /** Last requested node index. */
40     int fChildIndex = -1;
41
42     /** Last requested node. */
43     ChildNode fChild;
44
45     /** Owner of this cache */
46     ParentNode fOwner;
47
48     /** Pointer to the next object on the list,
49         only meaningful when actully stored in the free list. */

50     NodeListCache next;
51
52     NodeListCache(ParentNode owner) {
53         fOwner = owner;
54     }
55 }
56
57
Popular Tags