Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for misleadingSizeCollection (0.43 sec)

  1. guava-tests/test/com/google/common/primitives/BytesTest.java

        for (int delta : new int[] {+1, 0, -1}) {
          for (int i = 0; i < VALUES.length; i++) {
            List<Byte> list = Bytes.asList(VALUES).subList(0, i);
            Collection<Byte> misleadingSize = Helpers.misleadingSizeCollection(delta);
            misleadingSize.addAll(list);
            byte[] arr = Bytes.toArray(misleadingSize);
            assertThat(arr).hasLength(i);
            for (int j = 0; j < i; j++) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/Helpers.java

       *
       * @param delta the difference between the true size of the collection and the values returned by
       *     the size method
       */
      public static <T extends @Nullable Object> Collection<T> misleadingSizeCollection(int delta) {
        // It would be nice to be able to return a real concurrent
        // collection like ConcurrentLinkedQueue, so that e.g. concurrent
        // iteration would work, but that would not be GWT-compatible.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 17.7K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/BytesTest.java

        for (int delta : new int[] {+1, 0, -1}) {
          for (int i = 0; i < VALUES.length; i++) {
            List<Byte> list = Bytes.asList(VALUES).subList(0, i);
            Collection<Byte> misleadingSize = Helpers.misleadingSizeCollection(delta);
            misleadingSize.addAll(list);
            byte[] arr = Bytes.toArray(misleadingSize);
            assertThat(arr).hasLength(i);
            for (int j = 0; j < i; j++) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/Helpers.java

       *
       * @param delta the difference between the true size of the collection and the values returned by
       *     the size method
       */
      public static <T extends @Nullable Object> Collection<T> misleadingSizeCollection(int delta) {
        // It would be nice to be able to return a real concurrent
        // collection like ConcurrentLinkedQueue, so that e.g. concurrent
        // iteration would work, but that would not be GWT-compatible.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 17.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/ImmutableListTest.java

        List<String> sample = Lists.newArrayList("a", "b", "c");
        for (int delta : new int[] {-1, 0, 1}) {
          for (int i = 0; i < sample.size(); i++) {
            Collection<String> misleading = Helpers.misleadingSizeCollection(delta);
            List<String> expected = sample.subList(0, i);
            misleading.addAll(expected);
            assertEquals(expected, ImmutableList.copyOf(misleading));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/primitives/BooleansTest.java

        for (int delta : new int[] {+1, 0, -1}) {
          for (int i = 0; i < VALUES.length; i++) {
            List<Boolean> list = Booleans.asList(VALUES).subList(0, i);
            Collection<Boolean> misleadingSize = Helpers.misleadingSizeCollection(delta);
            misleadingSize.addAll(list);
            boolean[] arr = Booleans.toArray(misleadingSize);
            assertThat(arr).hasLength(i);
            for (int j = 0; j < i; j++) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 15:43:29 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/primitives/BooleansTest.java

        for (int delta : new int[] {+1, 0, -1}) {
          for (int i = 0; i < VALUES.length; i++) {
            List<Boolean> list = Booleans.asList(VALUES).subList(0, i);
            Collection<Boolean> misleadingSize = Helpers.misleadingSizeCollection(delta);
            misleadingSize.addAll(list);
            boolean[] arr = Booleans.toArray(misleadingSize);
            assertThat(arr).hasLength(i);
            for (int j = 0; j < i; j++) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 15:43:29 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/primitives/ShortsTest.java

        for (int delta : new int[] {+1, 0, -1}) {
          for (int i = 0; i < VALUES.length; i++) {
            List<Short> list = Shorts.asList(VALUES).subList(0, i);
            Collection<Short> misleadingSize = Helpers.misleadingSizeCollection(delta);
            misleadingSize.addAll(list);
            short[] arr = Shorts.toArray(misleadingSize);
            assertThat(arr).hasLength(i);
            for (int j = 0; j < i; j++) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 26.6K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/ImmutableListTest.java

        List<String> sample = Lists.newArrayList("a", "b", "c");
        for (int delta : new int[] {-1, 0, 1}) {
          for (int i = 0; i < sample.size(); i++) {
            Collection<String> misleading = Helpers.misleadingSizeCollection(delta);
            List<String> expected = sample.subList(0, i);
            misleading.addAll(expected);
            assertEquals(expected, ImmutableList.copyOf(misleading));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 23.3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/primitives/IntsTest.java

        for (int delta : new int[] {+1, 0, -1}) {
          for (int i = 0; i < VALUES.length; i++) {
            List<Integer> list = Ints.asList(VALUES).subList(0, i);
            Collection<Integer> misleadingSize = Helpers.misleadingSizeCollection(delta);
            misleadingSize.addAll(list);
            int[] arr = Ints.toArray(misleadingSize);
            assertThat(arr).hasLength(i);
            for (int j = 0; j < i; j++) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 28.4K bytes
    - Viewed (0)
Back to top