Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 40 for computeIfAbsent (0.27 sec)

  1. build-logic-commons/basics/src/main/kotlin/gradlebuild/basics/classanalysis/ClassGraph.kt

        val shadowPackagePrefix =
            shadowPackage.takeIf(String::isNotEmpty)
                ?.let { it.replace('.', '/') + "/" }
                ?: ""
    
        operator fun get(className: String) =
            classes.computeIfAbsent(className) {
                val outputClassName = if (unshadedPackages.matches(className)) className else shadowPackagePrefix + className
                ClassDetails(outputClassName).also { classDetails ->
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Sat Sep 30 16:17:28 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  2. api/maven-api-core/src/main/java/org/apache/maven/api/services/Interpolator.java

         *
         * @see Function
         * @see Optional
         * @see HashMap#computeIfAbsent(Object, Function)
         */
        static Function<String, String> memoize(Function<String, String> callback) {
            Map<String, Optional<String>> cache = new HashMap<>();
            return s -> cache.computeIfAbsent(s, v -> Optional.ofNullable(callback.apply(v)))
                    .orElse(null);
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Thu Oct 17 09:25:53 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  3. compat/maven-model-builder/src/main/java/org/apache/maven/model/superpom/DefaultSuperPomProvider.java

        public DefaultSuperPomProvider(ModelProcessor modelProcessor) {
            this.modelProcessor = modelProcessor;
        }
    
        @Override
        public Model getSuperModel(String version) {
            return SUPER_MODELS.computeIfAbsent(Objects.requireNonNull(version), v -> {
                String resource = "/org/apache/maven/model/pom-" + v + ".xml";
    
                InputStream is = getClass().getResourceAsStream(resource);
    
                if (is == null) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  4. compat/maven-model-builder/src/main/java/org/apache/maven/model/building/Graph.java

    @Deprecated(since = "4.0.0")
    class Graph {
    
        final Map<String, Set<String>> graph = new LinkedHashMap<>();
    
        synchronized void addEdge(String from, String to) throws CycleDetectedException {
            if (graph.computeIfAbsent(from, l -> new HashSet<>()).add(to)) {
                List<String> cycle = visitCycle(graph, Collections.singleton(to), new HashMap<>(), new LinkedList<>());
                if (cycle != null) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. compat/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java

            vFrom.setCompareScope(scopedVertices);
    
            List<MetadataGraphEdge> exList = excidentEdges.computeIfAbsent(vFrom, k -> new ArrayList<>());
    
            if (!exList.contains(e)) {
                exList.add(e);
            }
    
            List<MetadataGraphEdge> inList = incidentEdges.computeIfAbsent(vTo, k -> new ArrayList<>());
    
            if (!inList.contains(e)) {
                inList.add(e);
            }
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  6. impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultTypeRegistry.java

        public Optional<Type> lookup(String id) {
            return Optional.of(require(id));
        }
    
        @Override
        @Nonnull
        public Type require(String id) {
            nonNull(id, "id");
            return usedTypes.computeIfAbsent(id, i -> {
                Type type = types.get(id);
                if (type == null) {
                    // Copy data as the ArtifactHandler is not immutable, but Type should be.
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  7. impl/maven-core/src/main/java/org/apache/maven/artifact/handler/manager/DefaultArtifactHandlerManager.java

                    allHandlers.clear();
                }
            }
        }
    
        @Override
        public ArtifactHandler getArtifactHandler(String id) {
            return allHandlers.computeIfAbsent(id, k -> {
                Type type = typeRegistry.require(id);
                return new DefaultArtifactHandler(
                        id,
                        type.getExtension(),
                        type.getClassifier(),
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  8. impl/maven-core/src/main/java/org/apache/maven/internal/impl/Graph.java

            return vertices.get(id);
        }
    
        public Collection<Vertex> getVertices() {
            return vertices.values();
        }
    
        Vertex addVertex(String label) {
            return vertices.computeIfAbsent(label, Vertex::new);
        }
    
        void addEdge(Vertex from, Vertex to) throws CycleDetectedException {
            from.children.add(to);
            to.parents.add(from);
            List<String> cycle = findCycle(to);
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  9. compat/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultTransformerContext.java

                                // Ignore
                            }
                        }
                    }
                }
                return model;
            }
    
            public Model computeIfAbsent(Supplier<Model> supplier) {
                if (!set) {
                    synchronized (this) {
                        if (!set) {
                            this.set = true;
                            this.model = supplier.get();
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  10. impl/maven-core/src/main/java/org/apache/maven/lifecycle/Lifecycle.java

            lifecycle.allPhases().forEach(phase -> phase.plugins()
                    .forEach(plugin -> plugin.getExecutions().forEach(exec -> exec.getGoals()
                            .forEach(goal -> goals.computeIfAbsent(phase.name(), n -> new ArrayList<>())
                                    .add(plugin.getGroupId() + ":" + plugin.getArtifactId() + ":" + plugin.getVersion()
                                            + ":" + goal)))));
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top