Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 213 for toOptional (0.08 sec)

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

       * iterable is empty.
       *
       * <p><b>Java 8+ users:</b> the {@code Stream} equivalent to this method is {@code
       * stream.collect(MoreCollectors.toOptional()).orElse(defaultValue)}.
       *
       * @throws IllegalArgumentException if the iterator contains multiple elements
       */
      @ParametricNullness
      public static <T extends @Nullable Object> T getOnlyElement(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 43.6K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/Iterables.java

       * iterable is empty.
       *
       * <p><b>Java 8+ users:</b> the {@code Stream} equivalent to this method is {@code
       * stream.collect(MoreCollectors.toOptional()).orElse(defaultValue)}.
       *
       * @throws IllegalArgumentException if the iterator contains multiple elements
       */
      @ParametricNullness
      public static <T extends @Nullable Object> T getOnlyElement(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 43.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/Streams.java

       *
       * <p><b>Java 9 users:</b> use {@code optional.stream()} instead.
       */
      @Beta
      @InlineMe(replacement = "optional.stream()")
      @InlineMeValidationDisabled("Java 9+ API only")
      public static <T> Stream<T> stream(java.util.Optional<T> optional) {
        return optional.isPresent() ? Stream.of(optional.get()) : Stream.empty();
      }
    
      /**
       * If a value is present in {@code optional}, returns a stream containing only that element,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 37K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java

      }
    
      private static final Function<Object, Optional<?>> NULLABLE_TO_OPTIONAL =
          new Function<Object, Optional<?>>() {
            @Override
            public Optional<?> apply(@Nullable Object obj) {
              return Optional.fromNullable(obj);
            }
          };
    
      private static final Function<Optional<?>, @Nullable Object> OPTIONAL_TO_NULLABLE =
          new Function<Optional<?>, @Nullable Object>() {
            @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/FluentIterable.java

      public final Optional<@NonNull E> first() {
        Iterator<E> iterator = getDelegate().iterator();
        return iterator.hasNext() ? Optional.of(iterator.next()) : Optional.absent();
      }
    
      /**
       * Returns an {@link Optional} containing the last element in this fluent iterable. If the
       * iterable is empty, {@code Optional.absent()} is returned. If the underlying {@code iterable} is
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 35.3K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/FluentIterable.java

      public final Optional<@NonNull E> first() {
        Iterator<E> iterator = getDelegate().iterator();
        return iterator.hasNext() ? Optional.of(iterator.next()) : Optional.absent();
      }
    
      /**
       * Returns an {@link Optional} containing the last element in this fluent iterable. If the
       * iterable is empty, {@code Optional.absent()} is returned. If the underlying {@code iterable} is
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 34.8K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/fess/rank/fusion/DefaultSearcher.java

    import org.codelibs.fess.util.ComponentUtil;
    import org.codelibs.fess.util.DocumentUtil;
    import org.codelibs.fess.util.FacetResponse;
    import org.dbflute.optional.OptionalEntity;
    import org.dbflute.optional.OptionalThing;
    import org.lastaflute.web.util.LaRequestUtil;
    import org.opensearch.action.search.SearchRequestBuilder;
    import org.opensearch.action.search.SearchResponse;
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Aug 07 03:06:29 UTC 2025
    - 12.6K bytes
    - Viewed (0)
  8. pom.xml

    		<dependency>
    			<groupId>org.slf4j</groupId>
    			<artifactId>slf4j-api</artifactId>
    			<version>1.7.26</version>
    			<optional>true</optional>
    		</dependency>
    		<dependency>
    			<groupId>commons-logging</groupId>
    			<artifactId>commons-logging</artifactId>
    			<version>1.3.5</version>
    			<optional>true</optional>
    		</dependency>
    		<dependency>
    			<groupId>junit</groupId>
    			<artifactId>junit</artifactId>
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sun Aug 31 03:01:32 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/CharSource.java

        }
    
        @Override
        public Optional<Long> lengthIfKnown() {
          long result = 0L;
          for (CharSource source : sources) {
            Optional<Long> lengthIfKnown = source.lengthIfKnown();
            if (!lengthIfKnown.isPresent()) {
              return Optional.absent();
            }
            result += lengthIfKnown.get();
          }
          return Optional.of(result);
        }
    
        @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 25.7K bytes
    - Viewed (0)
  10. guava/src/com/google/common/io/CharSource.java

        }
    
        @Override
        public Optional<Long> lengthIfKnown() {
          long result = 0L;
          for (CharSource source : sources) {
            Optional<Long> lengthIfKnown = source.lengthIfKnown();
            if (!lengthIfKnown.isPresent()) {
              return Optional.absent();
            }
            result += lengthIfKnown.get();
          }
          return Optional.of(result);
        }
    
        @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 25.3K bytes
    - Viewed (0)
Back to top