Home
last modified time | relevance | path

Searched refs:node (Results 1 – 25 of 83) sorted by relevance

1234

/libcore/ojluni/src/main/java/java/util/concurrent/locks/
DAbstractQueuedLongSynchronizer.java148 private Node enq(Node node) { in enq() argument
152 U.putObject(node, Node.PREV, oldTail); in enq()
153 if (compareAndSetTail(oldTail, node)) { in enq()
154 oldTail.next = node; in enq()
170 Node node = new Node(mode); in addWaiter() local
175 U.putObject(node, Node.PREV, oldTail); in addWaiter()
176 if (compareAndSetTail(oldTail, node)) { in addWaiter()
177 oldTail.next = node; in addWaiter()
178 return node; in addWaiter()
193 private void setHead(Node node) { in setHead() argument
[all …]
DAbstractQueuedSynchronizer.java614 private Node enq(Node node) { in enq() argument
618 U.putObject(node, Node.PREV, oldTail); in enq()
619 if (compareAndSetTail(oldTail, node)) { in enq()
620 oldTail.next = node; in enq()
636 Node node = new Node(mode); in addWaiter() local
641 U.putObject(node, Node.PREV, oldTail); in addWaiter()
642 if (compareAndSetTail(oldTail, node)) { in addWaiter()
643 oldTail.next = node; in addWaiter()
644 return node; in addWaiter()
659 private void setHead(Node node) { in setHead() argument
[all …]
DStampedLock.java1034 WNode node = null, p; in acquireWrite() local
1052 else if (node == null) in acquireWrite()
1053 node = new WNode(WMODE, p); in acquireWrite()
1054 else if (node.prev != p) in acquireWrite()
1055 node.prev = p; in acquireWrite()
1056 else if (U.compareAndSwapObject(this, WTAIL, p, node)) { in acquireWrite()
1057 p.next = node; in acquireWrite()
1075 whead = node; in acquireWrite()
1076 node.prev = null; in acquireWrite()
1096 if ((np = node.prev) != p) { in acquireWrite()
[all …]
/libcore/luni/src/main/java/javax/xml/transform/dom/
DDOMResult.java71 public DOMResult(Node node) { in DOMResult() argument
72 setNode(node); in DOMResult()
91 public DOMResult(Node node, String systemId) { in DOMResult() argument
92 setNode(node); in DOMResult()
126 public DOMResult(Node node, Node nextSibling) { in DOMResult() argument
131 if (node == null) { in DOMResult()
136 … if ((node.compareDocumentPosition(nextSibling)&Node.DOCUMENT_POSITION_CONTAINED_BY)==0) { in DOMResult()
141 setNode(node); in DOMResult()
175 public DOMResult(Node node, Node nextSibling, String systemId) { in DOMResult() argument
180 if (node == null) { in DOMResult()
[all …]
DDOMSource.java43 private Node node; field in DOMSource
89 public DOMSource(Node node, String systemID) { in DOMSource() argument
90 setNode(node); in DOMSource()
99 public void setNode(Node node) { in setNode() argument
100 this.node = node; in setNode()
109 return node; in getNode()
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
DDocumentImpl.java128 private NodeImpl shallowCopy(short operation, Node node) { in shallowCopy() argument
129 switch (node.getNodeType()) { in shallowCopy()
131 AttrImpl attr = (AttrImpl) node; in shallowCopy()
143 return createCDATASection(((CharacterData) node).getData()); in shallowCopy()
146 return createComment(((Comment) node).getData()); in shallowCopy()
154 "Cannot copy node of type " + node.getNodeType()); in shallowCopy()
157 ElementImpl element = (ElementImpl) node; in shallowCopy()
193 return createEntityReference(node.getNodeName()); in shallowCopy()
196 ProcessingInstruction pi = (ProcessingInstruction) node; in shallowCopy()
200 return createTextNode(((Text) node).getData()); in shallowCopy()
[all …]
DNodeImpl.java228 static void setNameNS(NodeImpl node, String namespaceURI, String qualifiedName) { in setNameNS() argument
244 switch (node.getNodeType()) { in setNameNS()
251 AttrImpl attr = (AttrImpl) node; in setNameNS()
259 ElementImpl element = (ElementImpl) node; in setNameNS()
268 "Cannot rename nodes of type " + node.getNodeType()); in setNameNS()
277 static void setName(NodeImpl node, String name) { in setName() argument
289 switch (node.getNodeType()) { in setName()
291 AttrImpl attr = (AttrImpl) node; in setName()
297 ElementImpl element = (ElementImpl) node; in setName()
304 "Cannot rename nodes of type " + node.getNodeType()); in setName()
[all …]
DInnerNodeImpl.java58 for (NodeImpl node : children) { in getChildNodes()
59 list.add(node); in getChildNodes()
137 public boolean isParentOf(Node node) { in isParentOf() argument
138 LeafNodeImpl nodeImpl = (LeafNodeImpl) node; in isParentOf()
158 for (Node node = getFirstChild(); node != null; node = next) { in normalize()
159 next = node.getNextSibling(); in normalize()
160 node.normalize(); in normalize()
162 if (node.getNodeType() == Node.TEXT_NODE) { in normalize()
163 ((TextImpl) node).minimize(); in normalize()
236 for (NodeImpl node : children) { in getElementsByTagName()
[all …]
DDOMConfigurationImpl.java378 public void normalize(Node node) {
387 switch (node.getNodeType()) {
389 CDATASectionImpl cdata = (CDATASectionImpl) node;
402 node = cdata.replaceWithText();
406 TextImpl text = (TextImpl) node;
414 CommentImpl comment = (CommentImpl) node;
426 checkTextValidity(((ProcessingInstructionImpl) node).getData());
430 checkTextValidity(((AttrImpl) node).getValue());
434 ElementImpl element = (ElementImpl) node;
444 for (Node child = node.getFirstChild(); child != null; child = next) {
[all …]
/libcore/ojluni/src/main/java/sun/security/provider/certpath/
DPolicyNodeImpl.java132 PolicyNodeImpl(PolicyNodeImpl parent, PolicyNodeImpl node) { in PolicyNodeImpl() argument
133 this(parent, node.mValidPolicy, node.mQualifierSet, in PolicyNodeImpl()
134 node.mCriticalityIndicator, node.mExpectedPolicySet, false); in PolicyNodeImpl()
183 for (PolicyNodeImpl node : mChildren) { in toString()
184 buffer.append(node); in toString()
202 for (PolicyNodeImpl node : mChildren) { in setImmutable()
203 node.setImmutable(); in setImmutable()
255 PolicyNodeImpl node = it.next(); in prune() local
256 node.prune(depth); in prune()
259 if ((node.mChildren.size() == 0) && (depth > mDepth + 1)) in prune()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/prefs/
DFilePreferencesImplTest.java39 uroot = factory.userRoot().node("harmony_test"); in setUp()
40 sroot = factory.systemRoot().node("harmony_test"); in setUp()
76 Preferences child1 = uroot.node("child1"); in testChildNodes()
77 Preferences child2 = uroot.node("\u4e2d child2"); in testChildNodes()
78 Preferences grandchild = child1.node("grand"); in testChildNodes()
98 child1 = sroot.node("child1"); in testChildNodes()
99 child2 = sroot.node("child2"); in testChildNodes()
102 Preferences grandchild2 = child1.node("grand"); in testChildNodes()
112 assertNotSame(child1, sroot.node("child1")); in testChildNodes()
113 assertSame(sroot.node("child1"), sroot.node("child1")); in testChildNodes()
[all …]
DAbstractPreferencesTest.java97 pref = (AbstractPreferences) parent.node("mock"); in setUp()
156 p = (MockAbstractPreferences) pref.node("child"); in testProtectedFields()
193 Preferences child1 = pref.node("child1"); in testChildrenNames()
195 pref.node("child2"); in testChildrenNames()
196 pref.node("child3"); in testChildrenNames()
197 child1.node("subchild1"); in testChildrenNames()
416 assertSame(pref.node("samechild"), pref.node("samechild")); in testCharCase()
417 assertNotSame(pref.node("sameChild"), pref.node("samechild")); in testCharCase()
418 assertNotSame(pref.node("child"), pref.node("Child")); in testCharCase()
419 assertNotSame(pref.node("child"), pref.node("Child")); in testCharCase()
[all …]
/libcore/luni/src/test/java/libcore/xml/
DNodeTest.java55 for (Node node : flattenSubtree(documentElement)) { in testGetBaseUri()
56 if (node.getNodeType() == Node.ELEMENT_NODE in testGetBaseUri()
57 || node.getNodeType() == Node.DOCUMENT_NODE) { in testGetBaseUri()
58 assertFileUriEquals(file, node.getBaseURI()); in testGetBaseUri()
60 assertNull("Unexpected base URI for " + node, node.getBaseURI()); in testGetBaseUri()
81 private void traverse(Node node, List<Node> sink) { in traverse() argument
82 sink.add(node); in traverse()
84 NodeList children = node.getChildNodes(); in traverse()
DSimpleBuilderTest.java46 private String getTextContent(Node node) { in getTextContent() argument
47 String result = (node instanceof Text ? ((Text) node).getData() : ""); in getTextContent()
49 Node child = node.getFirstChild(); in getTextContent()
97 Node node = list.item(i); in testGoodFile1() local
99 if (node instanceof ProcessingInstruction) { in testGoodFile1()
100 proinst = proinst + node.getNodeValue(); in testGoodFile1()
101 } else if (node instanceof Comment) { in testGoodFile1()
102 comment = comment + node.getNodeValue(); in testGoodFile1()
DXsltXPathConformanceTestSuite.java470 private String nodeToNormalizedString(Node node) in nodeToNormalizedString() argument
476 emitNode(xmlSerializer, node); in nodeToNormalizedString()
481 private void emitNode(XmlSerializer serializer, Node node) throws IOException { in emitNode() argument
482 if (node == null) { in emitNode()
485 } else if (node.getNodeType() == Node.ELEMENT_NODE) { in emitNode()
486 Element element = (Element) node; in emitNode()
492 } else if (node.getNodeType() == Node.TEXT_NODE in emitNode()
493 || node.getNodeType() == Node.CDATA_SECTION_NODE) { in emitNode()
496 String trimmed = node.getTextContent().trim(); in emitNode()
501 } else if (node.getNodeType() == Node.DOCUMENT_NODE) { in emitNode()
[all …]
DDomTest.java265 for (Node node : allNodes) { in testLookupNamespaceURIWithXmlnsPrefix()
266 assertEquals(null, node.lookupNamespaceURI("xmlns")); in testLookupNamespaceURIWithXmlnsPrefix()
303 for (Node node : allNodes) { in testLookupPrefixWithUnusedUri()
304 assertEquals(null, node.lookupPrefix("http://unused")); in testLookupPrefixWithUnusedUri()
309 for (Node node : allNodes) { in testLookupPrefixWithNullUri()
310 assertEquals(null, node.lookupPrefix(null)); in testLookupPrefixWithNullUri()
578 for (Node node : allNodes) { in testIsSupported()
579 assertTrue(node.isSupported("XML", null)); in testIsSupported()
580 assertTrue(node.isSupported("XML", "3.0")); in testIsSupported()
581 assertFalse(node.isSupported("foo", null)); in testIsSupported()
[all …]
/libcore/luni/src/test/java/libcore/java/util/prefs/
DOldAbstractPreferencesTest.java65 pref = (AbstractPreferences) parent.node(nodeName); in setUp()
161 pref.node("New node"); in testRemove()
186 AbstractPreferences ap = (AbstractPreferences) pref.node("New node"); in testClear()
643 pref.node(nodeStr); in testKeys()
675 AbstractPreferences first = (AbstractPreferences) pref.node("First node"); in testChildrenNames()
676 AbstractPreferences second = (AbstractPreferences) pref.node("Second node"); in testChildrenNames()
703 .node("test"); in test_nodeExists()
721 AbstractPreferences node = (AbstractPreferences) pref.node("First node/sub node"); in testParent() local
723 assertTrue(node.parent().name().compareTo("First node") == 0); in testParent()
728 node.parent(); in testParent()
[all …]
DOldPreferencesTest.java66 pref.node(child).removeNode(); in setUp()
94 p.node(null); in testAbstractMethods()
139 Preferences child1 = pref.node("child1"); in testChildrenNames()
141 pref.node("child2"); in testChildrenNames()
142 pref.node("child3"); in testChildrenNames()
143 child1.node("subchild1"); in testChildrenNames()
165 Preferences pref = root.node("mock"); in testGet()
324 Preferences child = pref.node("mock"); in testName()
337 Preferences pref = parent.node("mock"); in testNode()
340 pref.node(null); in testNode()
[all …]
DOldFilePreferencesImplTest.java47 Preferences sroot = Preferences.systemRoot().node("test"); in testSystemChildNodes()
49 Preferences child1 = sroot.node("child1"); in testSystemChildNodes()
50 Preferences child2 = sroot.node("child2"); in testSystemChildNodes()
51 Preferences grandchild = child1.node("grand"); in testSystemChildNodes()
/libcore/ojluni/src/main/java/java/util/stream/
DNodes.java139 static <T> Node<T> node(T[] array) { in node() method in Nodes
152 static <T> Node<T> node(Collection<T> c) { in node() method in Nodes
192 static Node.OfInt node(int[] array) { in node() method in Nodes
229 static Node.OfLong node(final long[] array) { in node() method in Nodes
266 static Node.OfDouble node(final double[] array) { in node() method in Nodes
326 return node(array); in collect()
328 Node<P_OUT> node = new CollectorTask.OfRef<>(helper, generator, spliterator).invoke(); in collect() local
329 return flattenTree ? flatten(node, generator) : node; in collect()
363 return node(array); in collectInt()
366 Node.OfInt node = new CollectorTask.OfInt<>(helper, spliterator).invoke(); in collectInt() local
[all …]
DAbstractTask.java343 K node = (K) this; in isLeftmostNode() local
344 while (node != null) { in isLeftmostNode()
345 K parent = node.getParent(); in isLeftmostNode()
346 if (parent != null && parent.leftChild != node) in isLeftmostNode()
348 node = parent; in isLeftmostNode()
/libcore/ojluni/src/main/java/java/util/concurrent/
DPhaser.java753 QNode node = new QNode(this, phase, true, false, 0L); in awaitAdvanceInterruptibly() local
754 p = root.internalAwaitAdvance(phase, node); in awaitAdvanceInterruptibly()
755 if (node.wasInterrupted) in awaitAdvanceInterruptibly()
791 QNode node = new QNode(this, phase, true, true, nanos); in awaitAdvanceInterruptibly() local
792 p = root.internalAwaitAdvance(phase, node); in awaitAdvanceInterruptibly()
793 if (node.wasInterrupted) in awaitAdvanceInterruptibly()
1031 private int internalAwaitAdvance(int phase, QNode node) { in internalAwaitAdvance() argument
1040 if (node == null) { // spinning in noninterruptible mode in internalAwaitAdvance()
1047 node = new QNode(this, phase, false, false, 0L); in internalAwaitAdvance()
1048 node.wasInterrupted = interrupted; in internalAwaitAdvance()
[all …]
DLinkedBlockingDeque.java217 private boolean linkFirst(Node<E> node) { in linkFirst() argument
222 node.next = f; in linkFirst()
223 first = node; in linkFirst()
225 last = node; in linkFirst()
227 f.prev = node; in linkFirst()
236 private boolean linkLast(Node<E> node) { in linkLast() argument
241 node.prev = l; in linkLast()
242 last = node; in linkLast()
244 first = node; in linkLast()
246 l.next = node; in linkLast()
[all …]
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DDistinctOpTest.java95 Collection<Integer> node = exerciseOps(data, Stream::distinct); in testOpWithNull() local
96 assertUnique(node); in testOpWithNull()
98 node = withData(data). in testOpWithNull()
101 assertUnique(node); in testOpWithNull()
103 node = exerciseOps(data, s -> s.distinct().distinct()); in testOpWithNull()
104 assertUnique(node); in testOpWithNull()
113 Collection<Integer> node = exerciseOps(new SortedTestData<>(l), Stream::distinct); in testOpWithNullSorted() local
114 assertUnique(node); in testOpWithNullSorted()
115 assertSorted(node, cNullInteger); in testOpWithNullSorted()
/libcore/benchmarks/src/benchmarks/
DXmlParseBenchmark.java115 private int countDomElements(Node node) { in countDomElements() argument
117 for (; node != null; node = node.getNextSibling()) { in countDomElements()
118 if (node.getNodeType() == Node.ELEMENT_NODE) { in countDomElements()
121 result += countDomElements(node.getFirstChild()); in countDomElements()

1234