Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 69 for BiMap (0.21 sec)

  1. android/guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java

        BiMap<Integer, String> inverse = bimap.inverse();
        assertSame(bimap, inverse.inverse());
        assertTrue(inverse instanceof SynchronizedBiMap);
        assertSame(mutex, ((SynchronizedBiMap<?, ?>) inverse).mutex);
      }
    
      @Override
      public void testValues() {
        BiMap<String, Integer> map = create();
        Set<Integer> values = map.values();
        assertTrue(values instanceof SynchronizedSet);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/google/BiMapPutTester.java

    import com.google.common.collect.testing.features.CollectionSize;
    import com.google.common.collect.testing.features.MapFeature;
    import org.junit.Ignore;
    
    /** Tester for {@code BiMap.put} and {@code BiMap.forcePut}. */
    @GwtCompatible
    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    public class BiMapPutTester<K, V> extends AbstractBiMapTester<K, V> {
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/HashBiMap.java

          extends AbstractSet<T> {
        final HashBiMap<K, V> biMap;
    
        View(HashBiMap<K, V> biMap) {
          this.biMap = biMap;
        }
    
        @ParametricNullness
        abstract T forEntry(int entry);
    
        @Override
        public Iterator<T> iterator() {
          return new Iterator<T>() {
            private int index = biMap.firstInInsertionOrder;
            private int indexToRemove = ABSENT;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 36.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/EnumHashBiMapTest.java

      public void testCreate() {
        EnumHashBiMap<Currency, String> bimap = EnumHashBiMap.create(Currency.class);
        assertTrue(bimap.isEmpty());
        assertEquals("{}", bimap.toString());
        assertEquals(HashBiMap.create(), bimap);
        bimap.put(Currency.DOLLAR, "dollar");
        assertEquals("dollar", bimap.get(Currency.DOLLAR));
        assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar"));
      }
    
      public void testCreateFromMap() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 16:35:21 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/HashBiMap.java

      }
    
      @LazyInit @RetainedWith @CheckForNull private transient BiMap<V, K> inverse;
    
      @Override
      public BiMap<V, K> inverse() {
        BiMap<V, K> result = inverse;
        return (result == null) ? inverse = new Inverse() : result;
      }
    
      private final class Inverse extends IteratorBasedAbstractMap<V, K>
          implements BiMap<V, K>, Serializable {
        BiMap<K, V> forward() {
          return HashBiMap.this;
        }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Oct 13 14:11:58 GMT 2023
    - 24.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableBiMap.java

          ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map;
          // TODO(lowasser): if we need to make a copy of a BiMap because the
          // forward map is a view, don't make a copy of the non-view delegate map
          if (!bimap.isPartialView()) {
            return bimap;
          }
        }
        return copyOf(map.entrySet());
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/google/BiMapTestSuiteBuilder.java

    /**
     * Creates, based on your criteria, a JUnit test suite that exhaustively tests a {@code BiMap}
     * implementation.
     *
     * @author Louis Wasserman
     */
    @GwtIncompatible
    public class BiMapTestSuiteBuilder<K, V>
        extends PerCollectionSizeTestSuiteBuilder<
            BiMapTestSuiteBuilder<K, V>, TestBiMapGenerator<K, V>, BiMap<K, V>, Entry<K, V>> {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/EnumHashBiMap.java

    /**
     * A {@code BiMap} backed by an {@code EnumMap} instance for keys-to-values, and a {@code HashMap}
     * instance for values-to-keys. Null keys are not permitted, but null values are. An {@code
     * EnumHashBiMap} and its inverse are both serializable.
     *
     * <p>See the Guava User Guide article on <a href=
     * "https://github.com/google/guava/wiki/NewCollectionTypesExplained#bimap">{@code BiMap}</a>.
     *
     * @author Mike Bostock
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Aug 24 01:40:03 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/graph/DirectedNetworkConnections.java

      @Override
      public Set<N> predecessors() {
        return Collections.unmodifiableSet(((BiMap<E, N>) inEdgeMap).values());
      }
    
      @Override
      public Set<N> successors() {
        return Collections.unmodifiableSet(((BiMap<E, N>) outEdgeMap).values());
      }
    
      @Override
      public Set<E> edgesConnecting(N node) {
        return new EdgesConnecting<>(((BiMap<E, N>) outEdgeMap).inverse(), node);
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 2.2K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/google/BiMapInverseTester.java

    import java.util.Collections;
    import java.util.List;
    import org.junit.Ignore;
    
    /**
     * Tests for the {@code inverse} view of a BiMap.
     *
     * <p>This assumes that {@code bimap.inverse().inverse() == bimap}, which is not technically
     * required but is fulfilled by all current implementations.
     *
     * @author Louis Wasserman
     */
    @GwtCompatible(emulated = true)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3K bytes
    - Viewed (0)
Back to top