- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 584 for intern (0.03 seconds)
-
android/guava/src/com/google/common/collect/Interner.java
@DoNotMock("Use Interners.new*Interner") @J2ktIncompatible @GwtIncompatible public interface Interner<E> { /** * Chooses and returns the representative instance for any of a collection of instances that are * equal to each other. If two {@linkplain Object#equals equal} inputs are given to this method, * both calls will return the same instance. That is, {@code intern(a).equals(a)} always holds,Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Dec 21 03:10:51 GMT 2024 - 2K bytes - Click Count (0) -
guava/src/com/google/common/collect/Interner.java
@DoNotMock("Use Interners.new*Interner") @J2ktIncompatible @GwtIncompatible public interface Interner<E> { /** * Chooses and returns the representative instance for any of a collection of instances that are * equal to each other. If two {@linkplain Object#equals equal} inputs are given to this method, * both calls will return the same instance. That is, {@code intern(a).equals(a)} always holds,Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Dec 21 03:10:51 GMT 2024 - 2K bytes - Click Count (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 final class InternerFunction<E> implements Function<E, E> { private final Interner<E> interner; InternerFunction(Interner<E> interner) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Mar 08 16:16:42 GMT 2026 - 6K bytes - Click Count (0) -
android/guava-tests/benchmark/com/google/common/collect/InternersBenchmark.java
@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; } @CanIgnoreReturnValue @Benchmark int strongInterner(int reps) { Interner<String> interner = Interners.newStrongInterner(); for (int i = 0; i < reps; i++) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Feb 11 19:03:19 GMT 2025 - 1.6K bytes - Click Count (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 final class InternerFunction<E> implements Function<E, E> { private final Interner<E> interner; InternerFunction(Interner<E> interner) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Mar 08 16:16:42 GMT 2026 - 6K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/InternersTest.java
assertThat(pool.intern(canonical)).isSameInstanceAs(canonical); assertThat(pool.intern(not)).isSameInstanceAs(canonical); } 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 =
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 4.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/InternersTest.java
assertThat(pool.intern(canonical)).isSameInstanceAs(canonical); assertThat(pool.intern(not)).isSameInstanceAs(canonical); } 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 =
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 4.5K bytes - Click Count (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) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Aug 10 19:54:19 GMT 2025 - 12.5K bytes - Click Count (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) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Aug 10 19:54:19 GMT 2025 - 12.5K bytes - Click Count (0) -
guava/src/com/google/common/collect/Internal.java
import com.google.common.annotations.J2ktIncompatible; import java.time.Duration; /** This class is for {@code com.google.common.collect} use only! */ @J2ktIncompatible @GwtIncompatible // java.time.Duration final class Internal { /** * Returns the number of nanoseconds of the given duration without throwing or overflowing. * * <p>Instead of throwing {@link ArithmeticException}, this method silently saturates to eitherCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Nov 04 17:24:58 GMT 2025 - 1.7K bytes - Click Count (0)