Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for newReferenceArray (0.19 sec)

  1. guava-tests/test/com/google/common/util/concurrent/AtomicsTest.java

        AtomicReferenceArray<String> refArray = Atomics.newReferenceArray(length);
        for (int i = 0; i < length; ++i) {
          assertEquals(null, refArray.get(i));
        }
        assertThrows(IndexOutOfBoundsException.class, () -> refArray.get(length));
      }
    
      public void testNewReferenceArray_withNegativeLength() throws Exception {
        assertThrows(NegativeArraySizeException.class, () -> Atomics.newReferenceArray(-1));
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 2.5K bytes
    - Viewed (1)
  2. android/guava-tests/test/com/google/common/util/concurrent/AtomicsTest.java

        AtomicReferenceArray<String> refArray = Atomics.newReferenceArray(length);
        for (int i = 0; i < length; ++i) {
          assertEquals(null, refArray.get(i));
        }
        assertThrows(IndexOutOfBoundsException.class, () -> refArray.get(length));
      }
    
      public void testNewReferenceArray_withNegativeLength() throws Exception {
        assertThrows(NegativeArraySizeException.class, () -> Atomics.newReferenceArray(-1));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  3. 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.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sun Jun 20 10:45:35 GMT 2021
    - 2.5K bytes
    - Viewed (0)
Back to top