- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for casValue (0.04 sec)
-
guava/src/com/google/common/util/concurrent/AbstractFutureState.java
/** * Performs a {@linkplain java.lang.invoke.VarHandle#compareAndSet compare-and-set} operation on * {@link #valueField} of {@code future}. */ static boolean casValue(AbstractFutureState<?> future, @Nullable Object expect, Object update) { return ATOMIC_HELPER.casValue(future, expect, update); } /** Returns the value of the future, using a volatile read. */ final @Nullable Object value() { return valueField; }Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 34.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AbstractFutureState.java
/** * Performs a {@linkplain java.lang.invoke.VarHandle#compareAndSet compare-and-set} operation on * {@link #valueField} of {@code future}. */ static boolean casValue(AbstractFutureState<?> future, @Nullable Object expect, Object update) { return ATOMIC_HELPER.casValue(future, expect, update); } /** Returns the value of the future, using a volatile read. */ final @Nullable Object value() { return valueField; }Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 33.2K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/NullPointerTester.java
* anything that might slow down execution on such a hot path. Given that the methods are only * package-private, I feel OK with just not testing them for NPE. * * Note that testing casValue is particularly dangerous because it uses Unsafe under some * versions of Java, and apparently Unsafe can cause SIGSEGV instead of NPE—almost as if it's * not safe. */ concat(Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 24.9K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/NullPointerTester.java
* anything that might slow down execution on such a hot path. Given that the methods are only * package-private, I feel OK with just not testing them for NPE. * * Note that testing casValue is particularly dangerous because it uses Unsafe under some * versions of Java, and apparently Unsafe can cause SIGSEGV instead of NPE—almost as if it's * not safe. */ concat(Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 25.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/EnumsTest.java
HONDA, POODLE, } public void testGetIfPresent() { assertThat(Enums.getIfPresent(TestEnum.class, "CHEETO")).hasValue(TestEnum.CHEETO); assertThat(Enums.getIfPresent(TestEnum.class, "HONDA")).hasValue(TestEnum.HONDA); assertThat(Enums.getIfPresent(TestEnum.class, "POODLE")).hasValue(TestEnum.POODLE); assertThat(Enums.getIfPresent(TestEnum.class, "CHEETO")).isPresent();Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 20:07:52 UTC 2025 - 8.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/FluentIterableTest.java
assertThat(iterable.firstMatch(equalTo("cool"))).hasValue("cool"); assertThat(iterable.firstMatch(equalTo("pants"))).hasValue("pants"); assertThat(iterable.firstMatch(Predicates.alwaysFalse())).isAbsent(); assertThat(iterable.firstMatch(Predicates.alwaysTrue())).hasValue("cool"); } private static final class IntegerValueOfFunction implements Function<String, Integer> {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 30.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/graph/ValueGraphTest.java
graph.putEdgeValue(1, 2, "A"); assertThat(graph.edgeValue(EndpointPair.unordered(1, 2))).hasValue("A"); } @Test public void edgeValue_undirected_backwards() { graph = ValueGraphBuilder.undirected().build(); graph.putEdgeValue(1, 2, "A"); assertThat(graph.edgeValue(EndpointPair.unordered(2, 1))).hasValue("A"); } @Test public void edgeValue_undirected_mismatch() {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 07 15:57:03 UTC 2025 - 20.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/MoreCollectorsTest.java
public void testToOptionalEmpty() { assertThat(Stream.empty().collect(toOptional())).isEmpty(); } public void testToOptionalSingleton() { assertThat(Stream.of(1).collect(toOptional())).hasValue(1); } public void testToOptionalNull() { Stream<@Nullable Object> stream = Stream.of((Object) null); assertThrows(NullPointerException.class, () -> stream.collect(toOptional())); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu May 15 21:47:56 UTC 2025 - 3.2K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java
@SuppressWarnings("unchecked") K castKey = (K) key; @SuppressWarnings("unchecked") // similar to the above V castValue = (V) value; alertListenerIfPresent(castKey, castValue, RemovalCause.EXPLICIT); remove(key); return true; } return false; } @Override public boolean replace(K key, V oldValue, V newValue) {Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 21.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/IterablesTest.java
} public void testTryFind() { Iterable<String> list = newArrayList("cool", "pants"); assertThat(tryFind(list, equalTo("cool"))).hasValue("cool"); assertThat(tryFind(list, equalTo("pants"))).hasValue("pants"); assertThat(tryFind(list, Predicates.alwaysTrue())).hasValue("cool"); assertThat(tryFind(list, Predicates.alwaysFalse())).isAbsent(); assertCanIterateAgain(list); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:44:53 UTC 2025 - 45.6K bytes - Viewed (0)