Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 30 for ofNullable (0.18 sec)

  1. android/guava/src/com/google/common/collect/MoreCollectors.java

          }
        }
    
        @IgnoreJRERequirement // see enclosing class (whose annotation Animal Sniffer ignores here...)
        Optional<Object> getOptional() {
          if (extras.isEmpty()) {
            return Optional.ofNullable(element);
          } else {
            throw multiples(false);
          }
        }
    
        Object getElement() {
          if (element == null) {
            throw new NoSuchElementException();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  2. 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) {
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  3. 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);
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  4. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KtFirMetadataCalculator.kt

        }
        for (param in method.parameterList.parameters) {
            append(getBinaryPresentationWithCorrection(param.type))
        }
        append(")")
        append(getBinaryPresentationWithCorrection(Optional.ofNullable(method.returnType).orElse(PsiType.VOID)))
    }
    
    private fun getBinaryPresentationWithCorrection(psiType: PsiType): String =
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Tue Mar 26 09:19:07 GMT 2024
    - 10K bytes
    - Viewed (0)
  5. maven-api-impl/src/test/java/org/apache/maven/internal/impl/standalone/ApiRunner.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(Artifact artifact, Path path) {
                    paths.put(artifact, path);
                }
            };
        }
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu Apr 25 14:13:36 GMT 2024
    - 17.1K bytes
    - Viewed (0)
  6. api/maven-api-core/src/main/java/org/apache/maven/api/JavaPathType.java

         *
         * @return the name of the tool option for this path type
         */
        @Nonnull
        @Override
        public Optional<String> option() {
            return Optional.ofNullable(option);
        }
    
        /**
         * Returns the option followed by a string representation of the given path elements.
         * For example, if this type is {@link #MODULES}, then the option is {@code "--module-path"}
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Mar 01 17:18:13 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  7. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KtFirDataFlowInfoProvider.kt

                            unmappedCount -= 1
                            // Here we intentionally use the 'Optional' wrapper to make 'computeIfAbsent' work smoothly
                            Optional.ofNullable(computeTarget(element))
                        }
                    }
    
                    if (unmappedCount > 0) {
                        element.acceptChildren(this)
                    }
                }
            }
    
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Tue Apr 16 06:40:43 GMT 2024
    - 22.9K bytes
    - Viewed (0)
  8. 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);
      }
    
      Optional() {}
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 13K 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) {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 84.1K bytes
    - Viewed (0)
  10. maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/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();
                }
            }
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu May 02 13:13:07 GMT 2024
    - 73.1K bytes
    - Viewed (0)
Back to top