1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * Licensed to the Apache Software Foundation (ASF) under one or more 7 * contributor license agreements. See the NOTICE file distributed with 8 * this work for additional information regarding copyright ownership. 9 * The ASF licenses this file to You under the Apache License, Version 2.0 10 * (the "License"); you may not use this file except in compliance with 11 * the License. You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, software 16 * distributed under the License is distributed on an "AS IS" BASIS, 17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * See the License for the specific language governing permissions and 19 * limitations under the License. 20 */ 21 22 package com.sun.org.apache.xerces.internal.dom; 23 24 import java.io.Serializable; 25 26 /** 27 * This class is used, via a pool managed on CoreDocumentImpl, in ParentNode to 28 * improve performance of the NodeList accessors, getLength() and item(i). 29 * 30 * @xerces.internal 31 * 32 * @author Arnaud Le Hors, IBM 33 * 34 * @version $Id: NodeListCache.java,v 1.6 2010/07/20 20:25:25 joehw Exp $ 35 */ 36 class NodeListCache implements Serializable { 37 38 /** Serialization version. */ 39 private static final long serialVersionUID = -7927529254918631002L; 40 41 /** Cached node list length. */ 42 int fLength = -1; 43 44 /** Last requested node index. */ 45 int fChildIndex = -1; 46 47 /** Last requested node. */ 48 ChildNode fChild; 49 50 /** Owner of this cache */ 51 ParentNode fOwner; 52 53 /** Pointer to the next object on the list, 54 only meaningful when actully stored in the free list. */ 55 NodeListCache next; 56 57 NodeListCache(ParentNode owner) { 58 fOwner = owner; 59 } 60 }