- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for Interners (0.06 sec)
-
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) -
android/guava-tests/test/com/google/common/collect/InternersTest.java
assertSame(canonical, pool.intern(not)); } public void testWeak_null() { Interner<String> pool = Interners.newWeakInterner(); assertThrows(NullPointerException.class, () -> pool.intern(null)); } public void testWeak_builder() { int concurrencyLevel = 42; Interner<Object> interner = Interners.newBuilder().weak().concurrencyLevel(concurrencyLevel).build();
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
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/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/InternersTest.java
assertSame(canonical, pool.intern(not)); } public void testWeak_null() { Interner<String> pool = Interners.newWeakInterner(); assertThrows(NullPointerException.class, () -> pool.intern(null)); } public void testWeak_builder() { int concurrencyLevel = 42; Interner<Object> interner = Interners.newBuilder().weak().concurrencyLevel(concurrencyLevel).build();
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/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
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/src/com/google/common/collect/package-info.java
* an example, see {@link ForwardingCollection}. * * <h2>Other</h2> * * <ul> * <li>{@link EvictingQueue} * <li>{@link Interner}, {@link Interners} * <li>{@link MapMaker} * <li>{@link MinMaxPriorityQueue} * <li>{@link PeekingIterator} * </ul> */ @CheckReturnValue @ParametersAreNonnullByDefault package com.google.common.collect;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Jul 06 16:29:45 UTC 2023 - 5K bytes - Viewed (0)