Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ofNullable (0.23 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. 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)
  3. 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