- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for newReferenceArray (0.08 seconds)
-
android/guava/src/com/google/common/util/concurrent/Atomics.java
* * @param length the length of the array * @return a new {@code AtomicReferenceArray} with the given length */ public static <E> AtomicReferenceArray<@Nullable E> newReferenceArray(int length) { return new AtomicReferenceArray<>(length); } /** * Creates an {@code AtomicReferenceArray} instance with the same length as, and all elements * copied from, the given array. *Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 2.4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/AtomicsTest.java
AtomicReferenceArray<String> refArray = Atomics.newReferenceArray(length); for (int i = 0; i < length; ++i) { assertThat(refArray.get(i)).isNull(); } assertThrows(IndexOutOfBoundsException.class, () -> refArray.get(length)); } public void testNewReferenceArray_withNegativeLength() throws Exception { assertThrows(NegativeArraySizeException.class, () -> Atomics.newReferenceArray(-1)); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 2.8K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/AtomicsTest.java
AtomicReferenceArray<String> refArray = Atomics.newReferenceArray(length); for (int i = 0; i < length; ++i) { assertThat(refArray.get(i)).isNull(); } assertThrows(IndexOutOfBoundsException.class, () -> refArray.get(length)); } public void testNewReferenceArray_withNegativeLength() throws Exception { assertThrows(NegativeArraySizeException.class, () -> Atomics.newReferenceArray(-1)); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 2.8K bytes - Click Count (0)