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.DTMIterator;
25 import com.sun.org.apache.xml.internal.utils.QName;
26 import com.sun.org.apache.xpath.internal.XPathContext;
27 import com.sun.org.apache.xpath.internal.objects.XObject;
28 import com.sun.org.apache.xpath.internal.patterns.NodeTest;
29 import java.util.List;
30
31 /**
32 * This class defines a simplified type of union iterator that only
33 * tests along the child axes. If the conditions are right, it is
34 * much faster than using a UnionPathIterator.
35 */
36 public class UnionChildIterator extends ChildTestIterator
37 {
38 static final long serialVersionUID = 3500298482193003495L;
39 /**
40 * Even though these may hold full LocPathIterators, this array does
41 * not have to be cloned, since only the node test and predicate
42 * portion are used, and these only need static information. However,
43 * also note that index predicates can not be used!
44 */
45 private PredicatedNodeTest[] m_nodeTests = null;
46
47 /**
48 * Constructor for UnionChildIterator
49 */
50 public UnionChildIterator()
51 {
52 super(null);
53 }
54
|
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.DTMIterator;
24 import com.sun.org.apache.xml.internal.utils.QName;
25 import com.sun.org.apache.xpath.internal.XPathContext;
26 import com.sun.org.apache.xpath.internal.objects.XObject;
27 import com.sun.org.apache.xpath.internal.patterns.NodeTest;
28 import java.util.List;
29
30 /**
31 * This class defines a simplified type of union iterator that only
32 * tests along the child axes. If the conditions are right, it is
33 * much faster than using a UnionPathIterator.
34 *
35 * @LastModified: Oct 2017
36 */
37 public class UnionChildIterator extends ChildTestIterator
38 {
39 static final long serialVersionUID = 3500298482193003495L;
40 /**
41 * Even though these may hold full LocPathIterators, this array does
42 * not have to be cloned, since only the node test and predicate
43 * portion are used, and these only need static information. However,
44 * also note that index predicates can not be used!
45 */
46 private PredicatedNodeTest[] m_nodeTests = null;
47
48 /**
49 * Constructor for UnionChildIterator
50 */
51 public UnionChildIterator()
52 {
53 super(null);
54 }
55
|