Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 357 for intern (0.04 seconds)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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 either
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Nov 04 17:24:58 GMT 2025
    - 1.7K bytes
    - Click Count (0)
  9. android/guava/src/com/google/common/collect/Internal.java

    /** This class is for {@code com.google.common.collect} use only! */
    @J2ktIncompatible
    @GwtIncompatible // java.time.Duration
    @IgnoreJRERequirement // We use this method only from within APIs that require a 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 either
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Nov 04 17:24:58 GMT 2025
    - 1.8K bytes
    - Click Count (0)
  10. android/guava/src/com/google/common/base/Internal.java

    import com.google.common.annotations.J2ktIncompatible;
    import java.time.Duration;
    
    /** This class is for {@code com.google.common.base} 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 either
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Apr 14 15:16:19 GMT 2025
    - 1.9K bytes
    - Click Count (0)
Back to Top