- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 73 for BiMap (0.03 seconds)
-
android/guava/src/com/google/common/collect/BiMap.java
import java.util.Map; import java.util.Set; import org.jspecify.annotations.Nullable; /** * A bimap (or "bidirectional map") is a map that preserves the uniqueness of its values as well as * that of its keys. This constraint enables bimaps to support an "inverse view", which is another * bimap containing the same entries as this bimap but with reversed keys and values. * * <h3>Implementations</h3> * * <ul>
Created: 2026-04-03 12:43 - Last Modified: 2025-08-06 17:32 - 4.2K bytes - Click Count (0) -
guava/src/com/google/common/collect/BiMap.java
import java.util.Map; import java.util.Set; import org.jspecify.annotations.Nullable; /** * A bimap (or "bidirectional map") is a map that preserves the uniqueness of its values as well as * that of its keys. This constraint enables bimaps to support an "inverse view", which is another * bimap containing the same entries as this bimap but with reversed keys and values. * * <h3>Implementations</h3> * * <ul>
Created: 2026-04-03 12:43 - Last Modified: 2025-08-06 17:32 - 4.2K bytes - Click Count (0) -
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 BostockCreated: 2026-04-03 12:43 - Last Modified: 2025-09-22 15:50 - 5.2K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/DerivedGoogleCollectionGenerators.java
implements TestMapGenerator<K, V>, DerivedGenerator { private final OneSizeTestContainerGenerator<BiMap<K, V>, Entry<K, V>> generator; public MapGenerator( OneSizeTestContainerGenerator<BiMap<K, V>, Entry<K, V>> oneSizeTestContainerGenerator) { this.generator = oneSizeTestContainerGenerator; } @Override
Created: 2026-04-03 12:43 - Last Modified: 2024-12-22 03:38 - 6.8K bytes - Click Count (2) -
android/guava-testlib/src/com/google/common/collect/testing/google/AbstractBiMapTester.java
import com.google.common.collect.BiMap; import com.google.common.collect.testing.AbstractMapTester; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map.Entry; import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.Nullable; import org.junit.Ignore; /** Skeleton for a tester of a {@code BiMap}. */ @GwtCompatibleCreated: 2026-04-03 12:43 - Last Modified: 2024-12-22 03:38 - 3.3K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/AbstractBiMap.java
super(backward, forward); } /* * Serialization stores the forward bimap, the inverse of this inverse. * Deserialization calls inverse() on the forward bimap and returns that * inverse. * * If a bimap and its inverse are serialized together, the deserialized * instances have inverse() methods that return the other. */
Created: 2026-04-03 12:43 - Last Modified: 2025-09-22 15:50 - 13.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/HashBiMapTest.java
HashBiMap<String, String> bimap = HashBiMap.create(map); assertThat(bimap.get("canada")).isEqualTo("dollar"); assertThat(bimap.inverse().get("dollar")).isEqualTo("canada"); } private static final int N = 1000; public void testBashIt() throws Exception { BiMap<Integer, Integer> bimap = HashBiMap.create(N); BiMap<Integer, Integer> inverse = bimap.inverse(); for (int i = 0; i < N; i++) {
Created: 2026-04-03 12:43 - Last Modified: 2026-03-12 17:47 - 8.4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/AbstractBiMapTest.java
public void testIdentityKeySetIteratorRemove() { BiMap<Integer, String> bimap = new AbstractBiMap<Integer, String>( new IdentityHashMap<Integer, String>(), new IdentityHashMap<String, Integer>()) {}; bimap.put(1, "one"); bimap.put(2, "two"); bimap.put(3, "three"); Iterator<Integer> iterator = bimap.keySet().iterator(); iterator.next(); iterator.next();
Created: 2026-04-03 12:43 - Last Modified: 2024-12-19 18:03 - 2.3K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/AbstractBiMapTest.java
public void testIdentityKeySetIteratorRemove() { BiMap<Integer, String> bimap = new AbstractBiMap<Integer, String>( new IdentityHashMap<Integer, String>(), new IdentityHashMap<String, Integer>()) {}; bimap.put(1, "one"); bimap.put(2, "two"); bimap.put(3, "three"); Iterator<Integer> iterator = bimap.keySet().iterator(); iterator.next(); iterator.next();
Created: 2026-04-03 12:43 - Last Modified: 2024-12-19 18:03 - 2.3K bytes - Click Count (0) -
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()); } /**
Created: 2026-04-03 12:43 - Last Modified: 2025-09-23 17:50 - 22.7K bytes - Click Count (0)