- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 64 for Ref (0.11 sec)
-
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) -
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) -
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) -
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) -
android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java
int iterations = 10; WeakReference<Object> ref = new WeakReference<>(null); int expectedComputations = 0; for (int i = 0; i < iterations; i++) { // The entry should get garbage collected and recomputed. Object oldValue = ref.get(); if (oldValue == null) { expectedComputations++; } ref = new WeakReference<>(cache.getUnchecked(1)); oldValue = null;
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 86.2K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
* public boolean isDone() { * return ref.get() == null; * } * }); * }</pre> * * @throws RuntimeException if timed out or interrupted while waiting */ public static void awaitClear(WeakReference<?> ref) { awaitDone( new FinalizationPredicate() { @Override public boolean isDone() { return ref.get() == null; } }); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 11.6K bytes - Viewed (0) -
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) -
guava-tests/test/com/google/common/collect/SetsTest.java
ObjectOutputStream out = new ObjectOutputStream(bos); out.writeObject(original); byte[] handle = toByteArray(baseWireHandle + handleOffset); byte[] ref = prepended(TC_REFERENCE, handle); bos.write(ref); return bos.toByteArray(); } private static byte[] prepended(byte b, byte[] array) { byte[] out = new byte[array.length + 1]; out[0] = b;
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Mar 07 18:34:03 GMT 2024 - 49.3K bytes - Viewed (0) -
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) -
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)