Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for ImmutableBiMap (0.14 sec)

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

       * @throws NullPointerException if any key or value in {@code map} is null
       */
      public static <K, V> ImmutableBiMap<K, V> copyOf(Map<? extends K, ? extends V> map) {
        if (map instanceof ImmutableBiMap) {
          @SuppressWarnings("unchecked") // safe since map is not writable
          ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map;
          // TODO(lowasser): if we need to make a copy of a BiMap because the
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 22.2K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/ImmutableBiMap.java

       * @throws NullPointerException if any key or value in {@code map} is null
       */
      public static <K, V> ImmutableBiMap<K, V> copyOf(Map<? extends K, ? extends V> map) {
        if (map instanceof ImmutableBiMap) {
          @SuppressWarnings("unchecked") // safe since map is not writable
          ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map;
          // TODO(lowasser): if we need to make a copy of a BiMap because the
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ImmutableBiMapTest.java

      }
    
      public void testOf() {
        assertMapEquals(ImmutableBiMap.of("one", 1), "one", 1);
        assertMapEquals(ImmutableBiMap.of("one", 1).inverse(), 1, "one");
        assertMapEquals(ImmutableBiMap.of("one", 1, "two", 2), "one", 1, "two", 2);
        assertMapEquals(ImmutableBiMap.of("one", 1, "two", 2).inverse(), 1, "one", 2, "two");
        assertMapEquals(
            ImmutableBiMap.of("one", 1, "two", 2, "three", 3), "one", 1, "two", 2, "three", 3);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/RegularImmutableBiMap.java

      @LazyInit @RetainedWith @CheckForNull private transient ImmutableBiMap<V, K> inverse;
    
      @Override
      public ImmutableBiMap<V, K> inverse() {
        if (isEmpty()) {
          return ImmutableBiMap.of();
        }
        ImmutableBiMap<V, K> result = inverse;
        return (result == null) ? inverse = new Inverse() : result;
      }
    
      private final class Inverse extends ImmutableBiMap<V, K> {
    
        @Override
        public int size() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

              .put(SortedMultiset.class, ImmutableSortedMultiset.of())
              .put(ImmutableSortedMultiset.class, ImmutableSortedMultiset.of())
              .put(BiMap.class, ImmutableBiMap.of())
              .put(ImmutableBiMap.class, ImmutableBiMap.of())
              .put(Table.class, ImmutableTable.of())
              .put(ImmutableTable.class, ImmutableTable.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. android/guava/src/com/google/common/collect/CollectCollectors.java

      }
    
      static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableBiMap<K, V>> toImmutableBiMap(
          Function<? super T, ? extends K> keyFunction,
          Function<? super T, ? extends V> valueFunction) {
        checkNotNull(keyFunction);
        checkNotNull(valueFunction);
        return Collector.of(
            ImmutableBiMap.Builder<K, V>::new,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

              .put(SortedMultiset.class, ImmutableSortedMultiset.of())
              .put(ImmutableSortedMultiset.class, ImmutableSortedMultiset.of())
              .put(BiMap.class, ImmutableBiMap.of())
              .put(ImmutableBiMap.class, ImmutableBiMap.of())
              .put(Table.class, ImmutableTable.of())
              .put(ImmutableTable.class, ImmutableTable.of())
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  8. android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

        assertTrue(ArbitraryInstances.get(RowSortedTable.class).isEmpty());
        assertEquals(ImmutableBiMap.of(), ArbitraryInstances.get(BiMap.class));
        assertEquals(ImmutableBiMap.of(), ArbitraryInstances.get(ImmutableBiMap.class));
        assertTrue(ArbitraryInstances.get(ImmutableClassToInstanceMap.class).isEmpty());
        assertTrue(ArbitraryInstances.get(ClassToInstanceMap.class).isEmpty());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  9. guava-testlib/test/com/google/common/testing/FreshValueGeneratorTest.java

    import com.google.common.collect.HashBasedTable;
    import com.google.common.collect.HashBiMap;
    import com.google.common.collect.HashMultimap;
    import com.google.common.collect.HashMultiset;
    import com.google.common.collect.ImmutableBiMap;
    import com.google.common.collect.ImmutableCollection;
    import com.google.common.collect.ImmutableList;
    import com.google.common.collect.ImmutableListMultimap;
    import com.google.common.collect.ImmutableMap;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 18.4K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

        HashBiMap<K, V> bimap = HashBiMap.create();
        bimap.put(key, value);
        return bimap;
      }
    
      @Generates
      static <K, V> ImmutableBiMap<K, V> generateImmutableBimap(K key, V value) {
        return ImmutableBiMap.of(key, value);
      }
    
      @Generates
      static <R, C, V> Table<R, C, V> generateTable(R row, C column, V value) {
        return generateHashBasedTable(row, column, value);
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 28.7K bytes
    - Viewed (0)
Back to top