- Sort Score
- Num 10 results
- Language All
Results 21 - 30 of 99 for universe (0.05 seconds)
-
android/guava-testlib/src/com/google/common/collect/testing/google/BiMapInverseTester.java
import java.io.Serializable; import java.lang.reflect.Method; 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 */ @GwtCompatibleCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 3.1K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/BiMapPutTester.java
assertFalse(getMap().containsKey(k0())); assertTrue(getMap().containsKey(k1())); assertTrue(getMap().inverse().containsKey(null)); assertNull(getMap().get(k1())); assertEquals(k1(), getMap().inverse().get(null)); assertEquals(1, getMap().size()); } // nb: inverse is run through its own entire suite @MapFeature.Require(SUPPORTS_PUT) @CollectionSize.Require(ZERO)Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Nov 14 23:40:07 GMT 2024 - 5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/ImmutableListMultimapTest.java
ImmutableListMultimap.<String, Integer>of().inverse()); assertEquals(ImmutableListMultimap.of(1, "one"), ImmutableListMultimap.of("one", 1).inverse()); assertEquals( ImmutableListMultimap.of(1, "one", 2, "two"), ImmutableListMultimap.of("one", 1, "two", 2).inverse()); assertEquals( ImmutableListMultimap.of("of", 'o', "of", 'f', "to", 't', "to", 'o').inverse(),
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 24K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/HashBiMapTest.java
assertEquals("dollar", bimap.get("canada")); assertEquals("canada", bimap.inverse().get("dollar")); } 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++) { assertThat(bimap.put(2 * i, 2 * i + 1)).isNull(); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 28 16:03:47 GMT 2025 - 8.4K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/BiMapClearTester.java
@MapFeature.Require(SUPPORTS_REMOVE) public void testClearClearsInverse() { BiMap<V, K> inv = getMap().inverse(); getMap().clear(); assertTrue(getMap().isEmpty()); assertTrue(inv.isEmpty()); } @MapFeature.Require(SUPPORTS_REMOVE) public void testKeySetClearClearsInverse() { BiMap<V, K> inv = getMap().inverse(); getMap().keySet().clear(); assertTrue(getMap().isEmpty()); assertTrue(inv.isEmpty());
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Nov 14 23:40:07 GMT 2024 - 2.6K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/EnumBiMapTest.java
.inOrder(); // backward map ordered by country assertThat(bimap.inverse().keySet()) .containsExactly(Country.CANADA, Country.CHILE, Country.SWITZERLAND) .inOrder(); // backward map ordered by country (even for currency values) assertThat(bimap.inverse().values()) .containsExactly(Currency.DOLLAR, Currency.PESO, Currency.FRANC) .inOrder(); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 28 16:03:47 GMT 2025 - 11.9K bytes - Click Count (0) -
guava-testlib/src/com/google/common/collect/testing/google/BiMapRemoveTester.java
@CollectionSize.Require(absent = ZERO) public void testRemoveFromInverseRemovesFromForward() { getMap().inverse().remove(v0()); expectMissing(e0()); } @MapFeature.Require(SUPPORTS_REMOVE) @CollectionSize.Require(absent = ZERO) public void testRemoveFromInverseKeySetRemovesFromForward() { getMap().inverse().keySet().remove(v0()); expectMissing(e0()); } @MapFeature.Require(SUPPORTS_REMOVE)
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Nov 14 23:40:07 GMT 2024 - 3.2K bytes - Click Count (0) -
guava/src/com/google/common/collect/RegularImmutableBiMap.java
@LazyInit @RetainedWith private transient @Nullable 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() {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 21:07:18 GMT 2025 - 11K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/BiMap.java
/** * Returns the inverse view of this bimap, which maps each of this bimap's values to its * associated key. The two bimaps are backed by the same data; any changes to one will appear in * the other. * * <p><b>Note:</b> There is no guaranteed correspondence between the iteration order of a bimap * and that of its inverse. * * @return the inverse view of this bimap */
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Wed Aug 06 17:32:30 GMT 2025 - 4.2K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/HashBiMap.java
return oldValue; } } @LazyInit @RetainedWith private transient @Nullable BiMap<V, K> inverse; @Override public BiMap<V, K> inverse() { BiMap<V, K> result = inverse; return (result == null) ? inverse = new Inverse<>(this) : result; } private static final class Inverse<K extends @Nullable Object, V extends @Nullable Object>Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Dec 16 14:46:34 GMT 2025 - 37.1K bytes - Click Count (0)