Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ofNullable (0.15 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
Back to top