Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 31 for ofNullable (0.23 sec)

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

         */
        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)
  2. impl/maven-core/src/main/java/org/apache/maven/RepositoryUtils.java

            if (artifact == null) {
                return null;
            }
    
            Artifact result = toArtifact(artifact);
    
            List<Exclusion> excl = Optional.ofNullable(exclusions).orElse(Collections.emptyList()).stream()
                    .map(RepositoryUtils::toExclusion)
                    .collect(Collectors.toList());
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 16K bytes
    - Viewed (0)
  3. impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProject.java

            return project.getRootDirectory();
        }
    
        @Override
        public Optional<Project> getParent() {
            MavenProject parent = project.getParent();
            return Optional.ofNullable(session.getProject(parent));
        }
    
        @Nonnull
        private DependencyCoordinates toDependency(org.apache.maven.api.model.Dependency dependency) {
            return new DependencyCoordinates() {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. api/maven-api-core/src/main/java/org/apache/maven/api/JavaPathType.java

         *
         * @return the {@code javax.tool} enumeration value corresponding to this {@code JavaPathType}
         */
        public Optional<JavaFileManager.Location> location() {
            return Optional.ofNullable(location);
        }
    
        /**
         * Returns the path type associated to the given {@code javax.tool} location.
         * This method is the converse of {@link #location()}.
         *
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Mon May 13 09:53:45 UTC 2024
    - 15K bytes
    - Viewed (0)
  5. impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectManager.java

            // Session keep tracks of the Project per project id,
            // so we cannot use session.getProject(p) for forked projects
            // which are temporary clones
            return Optional.ofNullable(getMavenProject(project).getExecutionProject())
                    .map(p -> new DefaultProject(session, p));
        }
    
        private MavenProject getMavenProject(Project project) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/base/Optional.java

       * reference; otherwise returns {@link Optional#absent}.
       *
       * <p><b>Comparison to {@code java.util.Optional}:</b> this method is equivalent to Java 8's
       * {@code Optional.ofNullable}.
       */
      public static <T> Optional<T> fromNullable(@CheckForNull T nullableReference) {
        return (nullableReference == null) ? Optional.<T>absent() : new Present<T>(nullableReference);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  7. guava/src/com/google/common/graph/AbstractNetwork.java

            return incidentNodes(edge).adjacentNode(nodePresent).equals(nodeToCheck);
          }
        };
      }
    
      @Override
      public Optional<E> edgeConnecting(N nodeU, N nodeV) {
        return Optional.ofNullable(edgeConnectingOrNull(nodeU, nodeV));
      }
    
      @Override
      public Optional<E> edgeConnecting(EndpointPair<N> endpoints) {
        validateEndpoints(endpoints);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Mar 13 18:17:09 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvn/ProtoSession.java

                    private final Map<Artifact, Path> paths = new ConcurrentHashMap<>();
    
                    @Override
                    public Optional<Path> getPath(Artifact artifact) {
                        return Optional.ofNullable(paths.get(artifact));
                    }
    
                    @Override
                    public void setPath(ProducedArtifact artifact, Path path) {
                        paths.put(artifact, path);
                    }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/es/client/SearchEngineClient.java

            }
            final long execTime = systemHelper.getCurrentTimeAsLong() - startTime;
    
            return searchResult.build(requestBuilder, execTime, OptionalEntity.ofNullable(response, () -> {}));
        }
    
        public <T> T search(final String index, final SearchCondition<SearchRequestBuilder> condition,
                final SearchResult<T, SearchRequestBuilder, SearchResponse> searchResult) {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Sun Oct 20 02:08:03 UTC 2024
    - 86.1K bytes
    - Viewed (0)
  10. compat/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java

                    Supplier<? extends Activation.Builder> creator, Activation.Builder builder, Activation target) {
                stk.push(nextFrame("file", Activation::getFile));
                Optional.ofNullable(target.getFile());
                try {
                    return super.transformActivation_File(creator, builder, target);
                } finally {
                    stk.pop();
                }
            }
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 77.1K bytes
    - Viewed (0)
Back to top