< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/NodeSequence.java

Print this page


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
   3  * @LastModified: Oct 2017
   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.xpath.internal.axes;
  23 
  24 import com.sun.org.apache.xml.internal.dtm.DTM;
  25 import com.sun.org.apache.xml.internal.dtm.DTMFilter;
  26 import com.sun.org.apache.xml.internal.dtm.DTMIterator;
  27 import com.sun.org.apache.xml.internal.dtm.DTMManager;
  28 import com.sun.org.apache.xml.internal.utils.NodeVector;
  29 import com.sun.org.apache.xml.internal.utils.QName;
  30 import com.sun.org.apache.xpath.internal.NodeSetDTM;
  31 import com.sun.org.apache.xpath.internal.XPathContext;
  32 import com.sun.org.apache.xpath.internal.objects.XObject;
  33 import java.util.List;
  34 
  35 /**
  36  * This class is the dynamic wrapper for a Xalan DTMIterator instance, and
  37  * provides random access capabilities.


  38  */
  39 public class NodeSequence extends XObject
  40   implements DTMIterator, Cloneable, PathComponent
  41 {
  42     static final long serialVersionUID = 3866261934726581044L;
  43   /** The index of the last node in the iteration. */
  44   protected int m_last = -1;
  45 
  46   /**
  47    * The index of the next node to be fetched.  Useful if this
  48    * is a cached iterator, and is being used as random access
  49    * NodeList.
  50    */
  51   protected int m_next = 0;
  52 
  53   /**
  54    * A cache of a list of nodes obtained from the iterator so far.
  55    * This list is appended to until the iterator is exhausted and
  56    * the cache is complete.
  57    * <p>


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.

   3  */
   4 /*
   5  * Licensed to the Apache Software Foundation (ASF) under one or more
   6  * contributor license agreements.  See the NOTICE file distributed with
   7  * this work for additional information regarding copyright ownership.
   8  * The ASF licenses this file to You under the Apache License, Version 2.0
   9  * (the "License"); you may not use this file except in compliance with
  10  * the License.  You may obtain a copy of the License at
  11  *
  12  *      http://www.apache.org/licenses/LICENSE-2.0
  13  *
  14  * Unless required by applicable law or agreed to in writing, software
  15  * distributed under the License is distributed on an "AS IS" BASIS,
  16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 
  21 package com.sun.org.apache.xpath.internal.axes;
  22 
  23 import com.sun.org.apache.xml.internal.dtm.DTM;
  24 import com.sun.org.apache.xml.internal.dtm.DTMFilter;
  25 import com.sun.org.apache.xml.internal.dtm.DTMIterator;
  26 import com.sun.org.apache.xml.internal.dtm.DTMManager;
  27 import com.sun.org.apache.xml.internal.utils.NodeVector;
  28 import com.sun.org.apache.xml.internal.utils.QName;
  29 import com.sun.org.apache.xpath.internal.NodeSetDTM;
  30 import com.sun.org.apache.xpath.internal.XPathContext;
  31 import com.sun.org.apache.xpath.internal.objects.XObject;
  32 import java.util.List;
  33 
  34 /**
  35  * This class is the dynamic wrapper for a Xalan DTMIterator instance, and
  36  * provides random access capabilities.
  37  *
  38  * @LastModified: Oct 2017
  39  */
  40 public class NodeSequence extends XObject
  41   implements DTMIterator, Cloneable, PathComponent
  42 {
  43     static final long serialVersionUID = 3866261934726581044L;
  44   /** The index of the last node in the iteration. */
  45   protected int m_last = -1;
  46 
  47   /**
  48    * The index of the next node to be fetched.  Useful if this
  49    * is a cached iterator, and is being used as random access
  50    * NodeList.
  51    */
  52   protected int m_next = 0;
  53 
  54   /**
  55    * A cache of a list of nodes obtained from the iterator so far.
  56    * This list is appended to until the iterator is exhausted and
  57    * the cache is complete.
  58    * <p>


< prev index next >