- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 89 for Interner (0.08 sec)
-
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) -
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/src/com/google/common/collect/Interners.java
/** * Returns a function that delegates to the {@link Interner#intern} method of the given interner. * * @since 8.0 */ public static <E> Function<E, E> asFunction(Interner<E> interner) { return new InternerFunction<>(checkNotNull(interner)); } private static class InternerFunction<E> implements Function<E, E> { private final Interner<E> interner; public InternerFunction(Interner<E> interner) {
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/Interners.java
/** * Returns a function that delegates to the {@link Interner#intern} method of the given interner. * * @since 8.0 */ public static <E> Function<E, E> asFunction(Interner<E> interner) { return new InternerFunction<>(checkNotNull(interner)); } private static class InternerFunction<E> implements Function<E, E> { private final Interner<E> interner; public InternerFunction(Interner<E> interner) {
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/benchmark/com/google/common/collect/InternersBenchmark.java
import com.google.caliper.Benchmark; /** * 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
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-tests/test/com/google/common/collect/InternersTest.java
int concurrencyLevel = 42; Interner<Object> interner = Interners.newBuilder().strong().concurrencyLevel(concurrencyLevel).build(); InternerImpl<Object> internerImpl = (InternerImpl<Object>) interner; assertEquals(Strength.STRONG, internerImpl.map.keyStrength()); } public void testWeak_simplistic() { String canonical = "a"; String not = new String("a"); Interner<String> pool = Interners.newWeakInterner();
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/test/com/google/common/collect/InternersTest.java
int concurrencyLevel = 42; Interner<Object> interner = Interners.newBuilder().strong().concurrencyLevel(concurrencyLevel).build(); InternerImpl<Object> internerImpl = (InternerImpl<Object>) interner; assertEquals(Strength.STRONG, internerImpl.map.keyStrength()); } public void testWeak_simplistic() { String canonical = "a"; String not = new String("a"); Interner<String> pool = Interners.newWeakInterner();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 22:09:38 UTC 2024 - 4K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/InternersBenchmark.java
import com.google.caliper.Benchmark; /** * 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
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-tests/test/com/google/common/collect/BenchmarkHelpers.java
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 public <E> Interner<E> create(Collection<E> contents) {
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
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 public <E> Interner<E> create(Collection<E> contents) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 12.4K bytes - Viewed (0)