Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for interneti (0.12 sec)

  1. 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)
  2. 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)
  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 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top