Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for IndexOutOfBoundsException (0.14 sec)

  1. guava-tests/test/com/google/common/collect/IteratorsTest.java

        String[] array = {"foo", "bar"};
        assertFalse(Iterators.forArrayWithPosition(array, 2).hasNext());
        assertThrows(IndexOutOfBoundsException.class, () -> Iterators.forArrayWithPosition(array, -1));
        assertThrows(IndexOutOfBoundsException.class, () -> Iterators.forArrayWithPosition(array, 3));
      }
    
      @GwtIncompatible // unreasonably slow
      public void testForArrayUsingTester() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 54.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

        String[] array = {"foo", "bar"};
        assertFalse(Iterators.forArrayWithPosition(array, 2).hasNext());
        assertThrows(IndexOutOfBoundsException.class, () -> Iterators.forArrayWithPosition(array, -1));
        assertThrows(IndexOutOfBoundsException.class, () -> Iterators.forArrayWithPosition(array, 3));
      }
    
      @GwtIncompatible // unreasonably slow
      public void testForArrayUsingTester() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 54.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/base/Preconditions.java

       * {@code size} is negative, while this method throws {@code IllegalArgumentException}.
       *
       * @param index a user-supplied index identifying a position in an array, list or string
       * @param size the size of that array, list or string
       * @return the value of {@code index}
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 10 22:11:00 UTC 2025
    - 53K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/HttpUrlTest.kt

        val url = base.newBuilder().setPathSegment(1, "/").build()
        assertThat(url.encodedPath).isEqualTo("/a/%2F/c")
      }
    
      @Test
      fun setPathSegmentOutOfBounds() {
        assertFailsWith<IndexOutOfBoundsException> {
          HttpUrl.Builder().setPathSegment(1, "a")
        }
      }
    
      @Test
      fun setEncodedPathSegmentEncodes() {
        val base = parse("http://host/a/b/c")
        assertThat(
          base
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Aug 04 07:38:48 UTC 2025
    - 69.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Iterators.java

       * position}th position.
       *
       * @param position position of the element to return
       * @return the element at the specified position in {@code iterator}
       * @throws IndexOutOfBoundsException if {@code position} is negative or greater than or equal to
       *     the number of elements remaining in {@code iterator}
       */
      @ParametricNullness
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 50.5K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/HttpUrl.kt

       * | `http://host/?a=apple&b`          | `"a"`                   | `"b"`                   |
       */
      fun queryParameterName(index: Int): String {
        if (queryNamesAndValues == null) throw IndexOutOfBoundsException()
        return queryNamesAndValues[index * 2]!!
      }
    
      /**
       * Returns the value of the query parameter at `index`. For example this returns `"apple"` for
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 63.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/base/CharMatcher.java

       *     sequence.length()}
       * @return the index of the first matching character, guaranteed to be no less than {@code start},
       *     or {@code -1} if no character matches
       * @throws IndexOutOfBoundsException if start is negative or greater than {@code
       *     sequence.length()}
       */
      public int indexIn(CharSequence sequence, int start) {
        int length = sequence.length();
        checkPositionIndex(start, length);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 53.9K bytes
    - Viewed (0)
Back to top