- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for newWeakInterner (0.08 sec)
-
android/guava-tests/test/com/google/common/collect/InternersTest.java
String canonical = "a"; String not = new String("a"); Interner<String> pool = Interners.newWeakInterner(); assertSame(canonical, pool.intern(canonical)); assertSame(canonical, pool.intern(not)); } public void testWeak_null() { Interner<String> pool = Interners.newWeakInterner(); assertThrows(NullPointerException.class, () -> pool.intern(null)); } public void testWeak_builder() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 22:09:38 UTC 2024 - 4K bytes - Viewed (0) -
guava/src/com/google/common/collect/Interners.java
*/ public InternerBuilder strong() { this.strong = true; return this; } /** * Instructs the {@link InternerBuilder} to build a weak interner. * * @see Interners#newWeakInterner() */ @GwtIncompatible("java.lang.ref.WeakReference") public InternerBuilder weak() { this.strong = false; return this; } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Mar 13 14:30:51 UTC 2023 - 5.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/InternersTest.java
String canonical = "a"; String not = new String("a"); Interner<String> pool = Interners.newWeakInterner(); assertSame(canonical, pool.intern(canonical)); assertSame(canonical, pool.intern(not)); } public void testWeak_null() { Interner<String> pool = Interners.newWeakInterner(); assertThrows(NullPointerException.class, () -> pool.intern(null)); } public void testWeak_builder() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 22:09:38 UTC 2024 - 4K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/InternersBenchmark.java
/** * Benchmarking interners. * * @author Dimitris Andreou */ public class InternersBenchmark { @Benchmark int weakInterner(int reps) { Interner<String> interner = Interners.newWeakInterner(); for (int i = 0; i < reps; i++) { String unused = interner.intern(Double.toHexString(Math.random())); } return reps; } @Benchmark int strongInterner(int reps) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Mar 04 04:06:35 UTC 2022 - 1.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Interners.java
*/ public InternerBuilder strong() { this.strong = true; return this; } /** * Instructs the {@link InternerBuilder} to build a weak interner. * * @see Interners#newWeakInterner() */ @GwtIncompatible("java.lang.ref.WeakReference") public InternerBuilder weak() { this.strong = false; return this; } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Mar 13 14:30:51 UTC 2023 - 5.9K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Interner.java
* are available from the {@link Interners} class. * * <p>Note that {@code String.intern()} has some well-known performance limitations, and should * generally be avoided. Prefer {@link Interners#newWeakInterner} or another {@code Interner} * implementation even for {@code String} interning. * * @author Kevin Bourrillion * @since 3.0 */ @DoNotMock("Use Interners.new*Interner") @J2ktIncompatible @GwtIncompatible
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Mar 13 14:30:51 UTC 2023 - 2K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/InternersBenchmark.java
/** * Benchmarking interners. * * @author Dimitris Andreou */ public class InternersBenchmark { @Benchmark int weakInterner(int reps) { Interner<String> interner = Interners.newWeakInterner(); for (int i = 0; i < reps; i++) { String unused = interner.intern(Double.toHexString(Math.random())); } return reps; } @Benchmark int strongInterner(int reps) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Mar 04 04:06:35 UTC 2022 - 1.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/Interner.java
* are available from the {@link Interners} class. * * <p>Note that {@code String.intern()} has some well-known performance limitations, and should * generally be avoided. Prefer {@link Interners#newWeakInterner} or another {@code Interner} * implementation even for {@code String} interning. * * @author Kevin Bourrillion * @since 3.0 */ @DoNotMock("Use Interners.new*Interner") @J2ktIncompatible @GwtIncompatible
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Mar 13 14:30:51 UTC 2023 - 2K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/BenchmarkHelpers.java
} public enum InternerImpl implements InternerImplEnum { WeakInternerImpl { @Override public <E> Interner<E> create(Collection<E> contents) { Interner<E> interner = Interners.newWeakInterner(); for (E e : contents) { E unused = interner.intern(e); } return interner; } }, StrongInternerImpl { @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 12.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/BenchmarkHelpers.java
} public enum InternerImpl implements InternerImplEnum { WeakInternerImpl { @Override public <E> Interner<E> create(Collection<E> contents) { Interner<E> interner = Interners.newWeakInterner(); for (E e : contents) { E unused = interner.intern(e); } return interner; } }, StrongInternerImpl { @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 12.4K bytes - Viewed (0)