Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for Optional (0.17 sec)

  1. guava/src/com/google/common/collect/Iterators.java

       *
       * @since 11.0
       */
      public static <T> Optional<T> tryFind(Iterator<T> iterator, Predicate<? super T> predicate) {
        checkNotNull(iterator);
        checkNotNull(predicate);
        while (iterator.hasNext()) {
          T t = iterator.next();
          if (predicate.apply(t)) {
            return Optional.of(t);
          }
        }
        return Optional.absent();
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jan 30 00:14:39 GMT 2024
    - 50.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/cache/CacheBuilder.java

     *   <li>notification of evicted (or otherwise removed) entries
     *   <li>accumulation of cache access statistics
     * </ul>
     *
     * <p>These features are all optional; caches can be created using all or none of them. By default,
     * cache instances created by {@code CacheBuilder} will not perform any type of eviction.
     *
     * <p>Usage example:
     *
     * <pre>{@code
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 51.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/Iterators.java

       *
       * @since 11.0
       */
      public static <T> Optional<T> tryFind(Iterator<T> iterator, Predicate<? super T> predicate) {
        checkNotNull(iterator);
        checkNotNull(predicate);
        while (iterator.hasNext()) {
          T t = iterator.next();
          if (predicate.apply(t)) {
            return Optional.of(t);
          }
        }
        return Optional.absent();
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 51.1K bytes
    - Viewed (0)
Back to top