Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for Supplier (0.23 sec)

  1. api/maven-api-core/src/main/java/org/apache/maven/api/SessionData.java

         *
         * @param key the key for which to retrieve the session data, must not be {@code null}
         * @param supplier the supplier will compute the new value
         * @return the session data associated with the key
         */
        @Nullable
        <T> T computeIfAbsent(@Nonnull Key<T> key, @Nonnull Supplier<T> supplier);
    
        /**
         * Create a key using the given class as an identifier and as the type of the object.
         */
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Feb 28 23:31:09 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  2. maven-api-impl/src/main/java/org/apache/maven/internal/impl/resolver/DefaultModelCache.java

            public int hashCode() {
                return hash;
            }
        }
    
        static class CachingSupplier<T> implements Supplier<T> {
            final Supplier<T> supplier;
            volatile Object value;
    
            CachingSupplier(Supplier<T> supplier) {
                this.supplier = supplier;
            }
    
            @Override
            @SuppressWarnings({"unchecked", "checkstyle:InnerAssignment"})
            public T get() {
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu May 02 15:10:38 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  3. maven-core/src/main/java/org/apache/maven/internal/impl/SisuDiBridgeModule.java

    import java.util.ArrayList;
    import java.util.Comparator;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.util.function.Supplier;
    import java.util.stream.Collectors;
    
    import com.google.inject.AbstractModule;
    import com.google.inject.binder.AnnotatedBindingBuilder;
    import com.google.inject.name.Names;
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu Apr 25 14:13:36 GMT 2024
    - 8K bytes
    - Viewed (0)
  4. maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java

            Supplier<T> s = asSupplier(supplier);
            if (cache == null) {
                return s.get();
            } else {
                return cache.computeIfAbsent(groupId, artifactId, version, tag, s);
            }
        }
    
        private static <T> T cache(ModelCache cache, Source source, String tag, Callable<T> supplier) {
            Supplier<T> s = asSupplier(supplier);
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri May 03 08:48:38 GMT 2024
    - 61.5K bytes
    - Viewed (0)
  5. maven-api-impl/src/main/java/org/apache/maven/api/services/model/ModelCache.java

     * model builder.
     *
     */
    public interface ModelCache {
    
        <T> T computeIfAbsent(String groupId, String artifactId, String version, String tag, Supplier<T> data);
    
        <T> T computeIfAbsent(Source path, String tag, Supplier<T> data);
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  6. maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelTransformerContext.java

                    }
                }
                return model;
            }
    
            public Model computeIfAbsent(Supplier<Model> supplier) {
                if (!set) {
                    synchronized (this) {
                        if (!set) {
                            this.set = true;
                            this.model = supplier.get();
                            this.notifyAll();
                        }
                    }
                }
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 4K bytes
    - Viewed (0)
  7. maven-api-impl/src/main/java/org/apache/maven/internal/impl/resolver/MavenSessionBuilderSupplier.java

    import org.eclipse.aether.util.repository.SimpleArtifactDescriptorPolicy;
    
    import static java.util.Objects.requireNonNull;
    
    /**
     * A simple {@link Supplier} of {@link SessionBuilder} instances, that on each call supplies newly
     * constructed instance. To create session out of builder, use {@link SessionBuilder#build()}. For proper closing
     * of sessions, use {@link CloseableSession#close()} method on built instance(s).
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu May 02 16:33:18 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  8. maven-core/src/main/java/org/apache/maven/internal/transformation/impl/TransformedArtifact.java

    import java.nio.file.Path;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.util.Objects;
    import java.util.concurrent.atomic.AtomicReference;
    import java.util.function.Supplier;
    
    import org.apache.maven.artifact.DefaultArtifact;
    import org.apache.maven.internal.transformation.TransformationFailedException;
    import org.apache.maven.model.building.ModelBuildingException;
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Jan 10 12:55:54 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  9. maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLog.java

        @Override
        public void debug(Throwable error) {
            logger.debug("", error);
        }
    
        @Override
        public void debug(Supplier<String> content) {
            if (isDebugEnabled()) {
                logger.debug(content.get());
            }
        }
    
        @Override
        public void debug(Supplier<String> content, Throwable error) {
            if (isDebugEnabled()) {
                logger.debug(content.get(), error);
            }
        }
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Sep 22 09:07:17 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  10. maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java

            throw (T) t; // rely on vacuous cast
        }
    
        static class LazyMap<K, V> extends AbstractMap<K, V> {
            private final Supplier<Map<K, V>> supplier;
            private volatile Map<K, V> delegate;
    
            LazyMap(Supplier<Map<K, V>> supplier) {
                this.supplier = supplier;
            }
    
            @Override
            public Set<Entry<K, V>> entrySet() {
                if (delegate == null) {
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu May 02 15:10:38 GMT 2024
    - 56.9K bytes
    - Viewed (0)
Back to top