Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 java.desktop.jmod - Desktop Module
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module.
JDK 11 Desktop module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.desktop.jmod.
JDK 11 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Desktop module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ javax/imageio/spi/PartiallyOrderedSet.java
/* * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.imageio.spi; import java.util.AbstractSet; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.Map; import java.util.Set; /** * A set of {@code Object}s with pairwise orderings between them. * The {@code iterator} method provides the elements in * topologically sorted order. Elements participating in a cycle * are not returned. * * Unlike the {@code SortedSet} and {@code SortedMap} * interfaces, which require their elements to implement the * {@code Comparable} interface, this class receives ordering * information via its {@code setOrdering} and * {@code unsetPreference} methods. This difference is due to * the fact that the relevant ordering between elements is unlikely to * be inherent in the elements themselves; rather, it is set * dynamically accoring to application policy. For example, in a * service provider registry situation, an application might allow the * user to set a preference order for service provider objects * supplied by a trusted vendor over those supplied by another. * */ class PartiallyOrderedSet<E> extends AbstractSet<E> { // The topological sort (roughly) follows the algorithm described in // Horowitz and Sahni, _Fundamentals of Data Structures_ (1976), // p. 315. // Maps Objects to DigraphNodes that contain them private Map<E, DigraphNode<E>> poNodes = new HashMap<>(); // The set of Objects private Set<E> nodes = poNodes.keySet(); /** * Constructs a {@code PartiallyOrderedSet}. */ public PartiallyOrderedSet() {} public int size() { return nodes.size(); } public boolean contains(Object o) { return nodes.contains(o); } /** * Returns an iterator over the elements contained in this * collection, with an ordering that respects the orderings set * by the {@code setOrdering} method. */ public Iterator<E> iterator() { return new PartialOrderIterator<>(poNodes.values().iterator()); } /** * Adds an {@code Object} to this * {@code PartiallyOrderedSet}. */ public boolean add(E o) { if (nodes.contains(o)) { return false; } DigraphNode<E> node = new DigraphNode<>(o); poNodes.put(o, node); return true; } /** * Removes an {@code Object} from this * {@code PartiallyOrderedSet}. */ public boolean remove(Object o) { DigraphNode<E> node = poNodes.get(o); if (node == null) { return false; } poNodes.remove(o); node.dispose(); return true; } public void clear() { poNodes.clear(); } /** * Sets an ordering between two nodes. When an iterator is * requested, the first node will appear earlier in the * sequence than the second node. If a prior ordering existed * between the nodes in the opposite order, it is removed. * * @return {@code true} if no prior ordering existed * between the nodes, {@code false} otherwise. */ public boolean setOrdering(E first, E second) { DigraphNode<E> firstPONode = poNodes.get(first); DigraphNode<E> secondPONode = poNodes.get(second); secondPONode.removeEdge(firstPONode); return firstPONode.addEdge(secondPONode); } /** * Removes any ordering between two nodes. * * @return true if a prior prefence existed between the nodes. */ public boolean unsetOrdering(E first, E second) { DigraphNode<E> firstPONode = poNodes.get(first); DigraphNode<E> secondPONode = poNodes.get(second); return firstPONode.removeEdge(secondPONode) || secondPONode.removeEdge(firstPONode); } /** * Returns {@code true} if an ordering exists between two * nodes. */ public boolean hasOrdering(E preferred, E other) { DigraphNode<E> preferredPONode = poNodes.get(preferred); DigraphNode<E> otherPONode = poNodes.get(other); return preferredPONode.hasEdge(otherPONode); } } class PartialOrderIterator<E> implements Iterator<E> { LinkedList<DigraphNode<E>> zeroList = new LinkedList<>(); Map<DigraphNode<E>, Integer> inDegrees = new HashMap<>(); public PartialOrderIterator(Iterator<DigraphNode<E>> iter) { // Initialize scratch in-degree values, zero list while (iter.hasNext()) { DigraphNode<E> node = iter.next(); int inDegree = node.getInDegree(); inDegrees.put(node, inDegree); // Add nodes with zero in-degree to the zero list if (inDegree == 0) { zeroList.add(node); } } } public boolean hasNext() { return !zeroList.isEmpty(); } public E next() { DigraphNode<E> first = zeroList.removeFirst(); // For each out node of the output node, decrement its in-degree Iterator<DigraphNode<E>> outNodes = first.getOutNodes(); while (outNodes.hasNext()) { DigraphNode<E> node = outNodes.next(); int inDegree = inDegrees.get(node).intValue() - 1; inDegrees.put(node, inDegree); // If the in-degree has fallen to 0, place the node on the list if (inDegree == 0) { zeroList.add(node); } } return first.getData(); } public void remove() { throw new UnsupportedOperationException(); } }
⏎ javax/imageio/spi/PartiallyOrderedSet.java
Or download all of them as a single archive file:
File name: java.desktop-11.0.1-src.zip File size: 7974380 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.instrument.jmod - Instrument Module
2022-08-06, 194571👍, 5💬
Popular Posts:
The Jakarta-ORO Java classes are a set of text-processing Java classes that provide Perl5 compatible...
What Is poi-ooxml-5.2.3.jar? poi-ooxml-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which...
JDK 11 java.sql.rowset.jmod is the JMOD file for JDK 11 SQL Rowset module. JDK 11 SQL Rowset module ...
JDK 11 jdk.aot.jmod is the JMOD file for JDK 11 Ahead-of-Time (AOT) Compiler module. JDK 11 AOT Comp...
Apache Axis2 is the core engine for Web services. It is a complete re-design and re-write of the wid...