- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for asConverter (0.11 sec)
-
android/guava-tests/test/com/google/common/collect/MapsTest.java
() -> Maps.asConverter((BiMap<String, Integer>) biMap).convert("three")); } public void testAsConverter_toString() { ImmutableBiMap<String, Integer> biMap = ImmutableBiMap.of( "one", 1, "two", 2); Converter<String, Integer> converter = Maps.asConverter(biMap); assertEquals("Maps.asConverter({one=1, two=2})", converter.toString()); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 22:56:33 UTC 2025 - 62.7K bytes - Viewed (0) -
guava/src/com/google/common/base/Functions.java
* * <p>Note: if {@code map} is a {@link com.google.common.collect.BiMap BiMap} (or can be one), you * can use {@link com.google.common.collect.Maps#asConverter Maps.asConverter} instead to get a * function that also supports reverse conversion. * * <p>If you are okay with {@code null} being returned for an unrecognized key (instead of anRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 17:32:30 UTC 2025 - 15.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/MapsTest.java
() -> Maps.asConverter((BiMap<String, Integer>) biMap).convert("three")); } public void testAsConverter_toString() { ImmutableBiMap<String, Integer> biMap = ImmutableBiMap.of( "one", 1, "two", 2); Converter<String, Integer> converter = Maps.asConverter(biMap); assertEquals("Maps.asConverter({one=1, two=2})", converter.toString()); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 22:56:33 UTC 2025 - 65K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Converter.java
* #reverse reverse} views of these. * <li>Convert between specific preset values using {@link * com.google.common.collect.Maps#asConverter Maps.asConverter}. For example, use this to * create a "fake" converter for a unit test. It is unnecessary (and confusing) to <i>mock</i> * the {@code Converter} type using a mocking framework.
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Wed Jun 18 21:43:06 UTC 2025 - 22.8K bytes - Viewed (0) -
guava/src/com/google/common/collect/Maps.java
* com.google.common.base.Functions#forMap(Map)} or {@link * com.google.common.base.Functions#forMap(Map, Object)}. * * @since 16.0 */ public static <A, B> Converter<A, B> asConverter(BiMap<A, B> bimap) { return new BiMapConverter<>(bimap); } private static final class BiMapConverter<A, B> extends Converter<A, B> implements Serializable { private final BiMap<A, B> bimap;Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Nov 17 22:50:48 UTC 2025 - 163.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Maps.java
* com.google.common.base.Functions#forMap(Map)} or {@link * com.google.common.base.Functions#forMap(Map, Object)}. * * @since 16.0 */ public static <A, B> Converter<A, B> asConverter(BiMap<A, B> bimap) { return new BiMapConverter<>(bimap); } private static final class BiMapConverter<A, B> extends Converter<A, B> implements Serializable { private final BiMap<A, B> bimap;Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 23 17:50:58 UTC 2025 - 157.6K bytes - Viewed (0)