Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 143 for Optional (0.36 sec)

  1. android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

      }
    
      // common.base
      @Empty
      <T> com.google.common.base.Optional<T> generateGoogleOptional() {
        return com.google.common.base.Optional.absent();
      }
    
      @Generates
      <T> com.google.common.base.Optional<T> generateGoogleOptional(T value) {
        return com.google.common.base.Optional.of(value);
      }
    
      @Generates
      Joiner generateJoiner() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 28K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/Ascii.java

       *
       * @since 8.0
       */
      public static final byte ESC = 27;
    
      /**
       * File Separator: These four information separators may be used within data in optional fashion,
       * except that their hierarchical relationship shall be: FS is the most inclusive, then GS, then
       * RS, and US is least inclusive. (The content and length of a File, Group, Record, or Unit are
       * not specified.)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jul 19 15:43:07 GMT 2021
    - 21.6K bytes
    - Viewed (0)
  3. guava/src/com/google/common/base/MoreObjects.java

       * Predicates.notNull())}, static importing as necessary.
       *
       * <p><b>Note:</b> if {@code first} is represented as an {@link Optional}, this can be
       * accomplished with {@link Optional#or(Object) first.or(second)}. That approach also allows for
       * lazy evaluation of the fallback instance, using {@link Optional#or(Supplier)
       * first.or(supplier)}.
       *
       * <p><b>Java 9 users:</b> use {@code java.util.Objects.requireNonNullElse(first, second)}
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Oct 13 14:11:58 GMT 2023
    - 15.9K bytes
    - Viewed (0)
  4. guava-tests/benchmark/com/google/common/base/ToStringHelperBenchmark.java

                .addValue(null)
                .add(SHORT_NAME, java.util.Optional.of("1"))
                .add(LONG_NAME, java.util.Optional.of("1"))
                .add(SHORT_NAME, java.util.Optional.empty())
                .add(LONG_NAME, java.util.Optional.empty())
                .add(SHORT_NAME, Optional.of("2"))
                .add(SHORT_NAME, Optional.absent())
                .addValue(null)
                .add(SHORT_NAME, new int[] {1})
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri May 14 22:05:11 GMT 2021
    - 4.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/io/ByteSource.java

        }
    
        @Override
        public Optional<Long> sizeIfKnown() {
          Optional<Long> optionalUnslicedSize = ByteSource.this.sizeIfKnown();
          if (optionalUnslicedSize.isPresent()) {
            long unslicedSize = optionalUnslicedSize.get();
            long off = Math.min(offset, unslicedSize);
            return Optional.of(Math.min(length, unslicedSize - off));
          }
          return Optional.absent();
        }
    
        @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 26.2K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/HashBasedTable.java

     * order of the various views.
     *
     * <p>The views returned by {@link #column}, {@link #columnKeySet()}, and {@link #columnMap()} have
     * iterators that don't support {@code remove()}. Otherwise, all optional operations are supported.
     * Null row keys, columns keys, and values are not supported.
     *
     * <p>Lookups by row key are often faster than lookups by column key, because the data is stored in
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Jan 24 17:47:51 GMT 2022
    - 4K bytes
    - Viewed (0)
  7. guava-testlib/test/com/google/common/testing/FreshValueGeneratorTest.java

      }
    
      @AndroidIncompatible
      public void testJavaOptional() {
        FreshValueGenerator generator = new FreshValueGenerator();
        assertEquals(Optional.empty(), generator.generateFresh(new TypeToken<Optional<String>>() {}));
        assertEquals(Optional.of("2"), generator.generateFresh(new TypeToken<Optional<String>>() {}));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 18.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/MoreCollectors.java

       * @return {@code Optional.of(onlyElement)} if the stream has exactly one element (must not be
       *     {@code null}) and returns {@code Optional.empty()} if it has none.
       */
      @SuppressWarnings("unchecked")
      public static <T> Collector<T, ?, Optional<T>> toOptional() {
        return (Collector) TO_OPTIONAL;
      }
    
      private static final Object NULL_PLACEHOLDER = new Object();
    
    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)
  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
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/RangeMap.java

      /** Puts all the associations from {@code rangeMap} into this range map (optional operation). */
      void putAll(RangeMap<K, ? extends V> rangeMap);
    
      /** Removes all associations from this range map (optional operation). */
      void clear();
    
      /**
       * Removes all associations from this range map in the specified range (optional operation).
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 6.5K bytes
    - Viewed (0)
Back to top