Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for empty (0.14 sec)

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

    class CompactLinkedHashMap<K extends @Nullable Object, V extends @Nullable Object>
        extends CompactHashMap<K, V> {
      // TODO(lowasser): implement removeEldestEntry so this can be used as a drop-in replacement
    
      /** Creates an empty {@code CompactLinkedHashMap} instance. */
      public static <K extends @Nullable Object, V extends @Nullable Object>
          CompactLinkedHashMap<K, V> create() {
        return new CompactLinkedHashMap<>();
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/MoreCollectorsTest.java

     *
     * @author Louis Wasserman
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public class MoreCollectorsTest extends TestCase {
      public void testToOptionalEmpty() {
        assertThat(Stream.empty().collect(MoreCollectors.toOptional())).isEmpty();
      }
    
      public void testToOptionalSingleton() {
        assertThat(Stream.of(1).collect(MoreCollectors.toOptional())).hasValue(1);
      }
    
      public void testToOptionalNull() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/HashMultiset.java

    public final class HashMultiset<E extends @Nullable Object> extends AbstractMapBasedMultiset<E> {
    
      /** Creates a new, empty {@code HashMultiset} using the default initial capacity. */
      public static <E extends @Nullable Object> HashMultiset<E> create() {
        return create(ObjectCountHashMap.DEFAULT_SIZE);
      }
    
      /**
       * Creates a new, empty {@code HashMultiset} with the specified expected number of distinct
       * elements.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ArrayListMultimap.java

      // Default from ArrayList
      private static final int DEFAULT_VALUES_PER_KEY = 3;
    
      @VisibleForTesting transient int expectedValuesPerKey;
    
      /**
       * Creates a new, empty {@code ArrayListMultimap} with the default initial capacities.
       *
       * <p>This method will soon be deprecated in favor of {@code
       * MultimapBuilder.hashKeys().arrayListValues().build()}.
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/TreeMultimap.java

      /**
       * Creates an empty {@code TreeMultimap} ordered by the natural ordering of its keys and values.
       */
      @SuppressWarnings("rawtypes") // https://github.com/google/guava/issues/989
      public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create() {
        return new TreeMultimap<>(Ordering.natural(), Ordering.natural());
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Mar 09 00:21:17 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/ComparatorsTest.java

      }
    
      public void testEmptiesFirst() {
        Optional<String> empty = Optional.empty();
        Optional<String> abc = Optional.of("abc");
        Optional<String> z = Optional.of("z");
    
        Comparator<Optional<String>> comparator = Comparators.emptiesFirst(comparing(String::length));
        Helpers.testComparator(comparator, empty, z, abc);
    
        // Just demonstrate that no explicit type parameter is required
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Apr 11 08:42:51 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/ObjectArraysTest.java

      }
    
      @GwtIncompatible // ObjectArrays.newArray(Class, int)
      public void testNewArray_fromClass_Empty() {
        String[] empty = ObjectArrays.newArray(String.class, 0);
        assertEquals(String[].class, empty.getClass());
        assertThat(empty).isEmpty();
      }
    
      @GwtIncompatible // ObjectArrays.newArray(Class, int)
      public void testNewArray_fromClass_Nonempty() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/ObjectArraysTest.java

      }
    
      @GwtIncompatible // ObjectArrays.newArray(Class, int)
      public void testNewArray_fromClass_Empty() {
        String[] empty = ObjectArrays.newArray(String.class, 0);
        assertEquals(String[].class, empty.getClass());
        assertThat(empty).isEmpty();
      }
    
      @GwtIncompatible // ObjectArrays.newArray(Class, int)
      public void testNewArray_fromClass_Nonempty() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/RegularImmutableSortedSet.java

    @SuppressWarnings({"serial", "rawtypes"})
    @ElementTypesAreNonnullByDefault
    final class RegularImmutableSortedSet<E> extends ImmutableSortedSet<E> {
      static final RegularImmutableSortedSet<Comparable> NATURAL_EMPTY_SET =
          new RegularImmutableSortedSet<>(ImmutableList.<Comparable>of(), Ordering.natural());
    
      @VisibleForTesting final transient ImmutableList<E> elements;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/MoreCollectors.java

       * @throws NullPointerException if any element in the stream is {@code null}.
       * @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;
      }
    
    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)
Back to top