Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 140 for ImmutableMap (0.13 sec)

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

       * @throws NullPointerException if any key or value in {@code map} is null
       */
      public static <K, V> ImmutableMap<K, V> copyOf(Map<? extends K, ? extends V> map) {
        if ((map instanceof ImmutableMap) && !(map instanceof SortedMap)) {
          @SuppressWarnings("unchecked") // safe since map is not writable
          ImmutableMap<K, V> kvMap = (ImmutableMap<K, V>) map;
          if (!kvMap.isPartialView()) {
            return kvMap;
          }
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/ImmutableMap.java

         * java.util.LinkedHashMap LinkedHashMap} and {@link ImmutableMap#copyOf(Map)} rather than
         * {@code ImmutableMap.Builder}.
         *
         * @since 31.1
         */
        public ImmutableMap<K, V> buildKeepingLast() {
          return build(false);
        }
    
        @VisibleForTesting // only for testing JDK backed implementation
        ImmutableMap<K, V> buildJdkBacked() {
          checkState(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 44.6K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/google/ReflectionFreeAssertThrows.java

        };
    
        // used under GWT, etc., since the override of this method does not exist there
        ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> exceptions() {
          return ImmutableMap.of();
        }
      }
    
      private static final ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> INSTANCE_OF =
          ImmutableMap.<Class<? extends Throwable>, Predicate<Throwable>>builder()
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 19:10:20 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  4. guava-testlib/test/com/google/common/testing/ReflectionFreeAssertThrows.java

        };
    
        // used under GWT, etc., since the override of this method does not exist there
        ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> exceptions() {
          return ImmutableMap.of();
        }
      }
    
      private static final ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> INSTANCE_OF =
          ImmutableMap.<Class<? extends Throwable>, Predicate<Throwable>>builder()
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 22 13:49:09 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

              .put(ImmutableSortedSet.class, ImmutableSortedSet.of())
              .put(NavigableSet.class, Sets.unmodifiableNavigableSet(Sets.newTreeSet()))
              .put(Map.class, ImmutableMap.of())
              .put(ImmutableMap.class, ImmutableMap.of())
              .put(SortedMap.class, ImmutableSortedMap.of())
              .put(ImmutableSortedMap.class, ImmutableSortedMap.of())
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableSortedMap.java

       * ImmutableSortedMap}.
       *
       * @throws UnsupportedOperationException always
       * @deprecated Use {@link ImmutableSortedMap#toImmutableSortedMap}.
       */
      @DoNotCall("Use toImmutableSortedMap")
      @Deprecated
      public static <T extends @Nullable Object, K, V>
          Collector<T, ?, ImmutableMap<K, V>> toImmutableMap(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/SparseImmutableTable.java

        this.cellColumnInRowIndices = cellColumnInRowIndices;
        ImmutableMap.Builder<R, ImmutableMap<C, V>> rowBuilder =
            new ImmutableMap.Builder<>(rows.size());
        for (Entry<R, Map<C, V>> row : rows.entrySet()) {
          rowBuilder.put(row.getKey(), ImmutableMap.copyOf(row.getValue()));
        }
        this.rowMap = rowBuilder.buildOrThrow();
    
        ImmutableMap.Builder<C, ImmutableMap<R, V>> columnBuilder =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/DenseImmutableTable.java

        }
      }
    
      @Override
      public ImmutableMap<C, Map<R, V>> columnMap() {
        // Casts without copying.
        ImmutableMap<C, ImmutableMap<R, V>> columnMap = this.columnMap;
        return ImmutableMap.<C, Map<R, V>>copyOf(columnMap);
      }
    
      @Override
      public ImmutableMap<R, Map<C, V>> rowMap() {
        // Casts without copying.
        ImmutableMap<R, ImmutableMap<C, V>> rowMap = this.rowMap;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/RegularImmutableTableTest.java

      public void testColumn() {
        for (ImmutableTable<Character, Integer, String> testInstance : getTestInstances()) {
          assertEquals(ImmutableMap.of('a', "foo", 'b', "bar"), testInstance.column(1));
          assertEquals(ImmutableMap.of('a', "baz"), testInstance.column(2));
          assertEquals(ImmutableMap.of(), testInstance.column(3));
        }
      }
    
      public void testColumnKeySet() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  10. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableBiMap.java

          ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map;
          return bimap;
        }
    
        if (map.isEmpty()) {
          return of();
        }
    
        ImmutableMap<K, V> immutableMap = ImmutableMap.copyOf(map);
        return new RegularImmutableBiMap<K, V>(immutableMap);
      }
    
      public static <K, V> ImmutableBiMap<K, V> copyOf(
          Iterable<? extends Entry<? extends K, ? extends V>> entries) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 23 18:43:40 UTC 2024
    - 7.1K bytes
    - Viewed (0)
Back to top