Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 104 for ImmutableMap (0.07 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/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)
  8. 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)
  9. android/guava-tests/test/com/google/common/collect/SingletonImmutableTableTest.java

      }
    
      public void testColumn() {
        assertEquals(ImmutableMap.of(), testTable.column(0));
        assertEquals(ImmutableMap.of('a', "blah"), testTable.column(1));
      }
    
      public void testColumnKeySet() {
        assertEquals(ImmutableSet.of(1), testTable.columnKeySet());
      }
    
      public void testColumnMap() {
        assertEquals(ImmutableMap.of(1, ImmutableMap.of('a', "blah")), testTable.columnMap());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/TreeRangeMapTest.java

        assertEquals(
            ImmutableMap.of(Range.closedOpen(5, 7), 1, Range.closed(9, 10), 2), sub.asMapOfRanges());
        sub.put(Range.closed(7, 9), 4);
        assertEquals(
            ImmutableMap.of(
                Range.closedOpen(5, 7), 1, Range.closed(7, 9), 4, Range.openClosed(9, 10), 2),
            sub.asMapOfRanges());
        assertEquals(
            ImmutableMap.of(
                Range.open(3, 7),
                1,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sun Oct 06 13:04:03 UTC 2024
    - 29.9K bytes
    - Viewed (0)
Back to top