Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for ref (0.12 sec)

  1. android/guava/src/com/google/common/base/FinalizableWeakReference.java

     * the License.
     */
    
    package com.google.common.base;
    
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import java.lang.ref.ReferenceQueue;
    import java.lang.ref.WeakReference;
    import javax.annotation.CheckForNull;
    
    /**
     * Weak reference with a {@code finalizeReferent()} method which a background thread invokes after
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 23 15:09:35 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  2. guava/src/com/google/common/base/Platform.java

      }
    
      static <T extends Enum<T>> Optional<T> getEnumIfPresent(Class<T> enumClass, String value) {
        WeakReference<? extends Enum<?>> ref = Enums.getEnumConstants(enumClass).get(value);
        return ref == null ? Optional.<T>absent() : Optional.of(enumClass.cast(ref.get()));
      }
    
      static String formatCompact4Digits(double value) {
        return String.format(Locale.ROOT, "%.4g", value);
      }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Jun 26 17:58:45 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/base/FinalizableSoftReference.java

     * the License.
     */
    
    package com.google.common.base;
    
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import java.lang.ref.ReferenceQueue;
    import java.lang.ref.SoftReference;
    import javax.annotation.CheckForNull;
    
    /**
     * Soft reference with a {@code finalizeReferent()} method which a background thread invokes after
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 23 15:09:35 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/base/Enums.java

        checkNotNull(value);
        return Platform.getEnumIfPresent(enumClass, value);
      }
    
      @GwtIncompatible // java.lang.ref.WeakReference
      private static final Map<Class<? extends Enum<?>>, Map<String, WeakReference<? extends Enum<?>>>>
          enumConstantCache = new WeakHashMap<>();
    
      @GwtIncompatible // java.lang.ref.WeakReference
      private static <T extends Enum<T>> Map<String, WeakReference<? extends Enum<?>>> populateCache(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 26 11:56:44 GMT 2023
    - 5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/CacheReferencesTest.java

    import com.google.common.cache.TestingRemovalListeners.CountingRemovalListener;
    import com.google.common.collect.ImmutableSet;
    import com.google.common.collect.Iterables;
    import java.lang.ref.WeakReference;
    import junit.framework.TestCase;
    
    /**
     * Tests of basic {@link LoadingCache} operations with all possible combinations of key & value
     * strengths.
     *
     * @author mike nonemacher
     */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 6.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/base/Platform.java

         * class could be unloaded after the above call to `getEnumConstants` but before we call
         * `get()`, but that is vanishingly unlikely.
         */
        return ref == null ? Optional.absent() : Optional.fromNullable(enumClass.cast(ref.get()));
      }
    
      static String formatCompact4Digits(double value) {
        return String.format(Locale.ROOT, "%.4g", value);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 15 22:32:14 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/base/AbstractIteratorTest.java

              @Override
              public Object computeNext() {
                return new Object();
              }
            };
        WeakReference<Object> ref = new WeakReference<>(itr.next());
        GcFinalization.awaitClear(ref);
      }
    
      public void testReentrantHasNext() {
        Iterator<Integer> iter =
            new AbstractIterator<Integer>() {
              @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu May 04 09:41:29 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/base/AbstractIteratorTest.java

              @Override
              public Object computeNext() {
                return new Object();
              }
            };
        WeakReference<Object> ref = new WeakReference<>(itr.next());
        GcFinalization.awaitClear(ref);
      }
    
      public void testReentrantHasNext() {
        Iterator<Integer> iter =
            new AbstractIterator<Integer>() {
              @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu May 04 09:41:29 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/base/FinalizablePhantomReference.java

     * the License.
     */
    
    package com.google.common.base;
    
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import java.lang.ref.PhantomReference;
    import java.lang.ref.ReferenceQueue;
    import javax.annotation.CheckForNull;
    
    /**
     * Phantom reference with a {@code finalizeReferent()} method which a background thread invokes
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 23 15:09:35 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/base/EnumsTest.java

    import com.google.common.testing.NullPointerTester;
    import com.google.common.testing.SerializableTester;
    import java.io.File;
    import java.lang.annotation.Retention;
    import java.lang.annotation.RetentionPolicy;
    import java.lang.ref.WeakReference;
    import java.lang.reflect.Field;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.util.HashSet;
    import java.util.Set;
    import junit.framework.TestCase;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 8.8K bytes
    - Viewed (0)
Back to top