Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 41 for index (0.2 sec)

  1. guava-testlib/src/com/google/common/collect/testing/Helpers.java

          @Override
          public T get(int index) {
            return data.get(index);
          }
    
          @Override
          public T set(int index, T element) {
            return data.set(index, element);
          }
    
          @Override
          public boolean add(T element) {
            return data.add(element);
          }
    
          @Override
          public void add(int index, T element) {
            data.add(index, element);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 11 16:13:05 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        // Our call site for get() should be in the trace.
        int index = findStackFrame(e, getClass().getName(), "getExpectingExecutionException");
    
        assertThat(index).isNotEqualTo(0);
    
        // Above our method should be the call to get(). Don't assert on the class
        // because it could be some superclass.
        assertThat(e.getStackTrace()[index - 1].getMethodName()).isEqualTo("get");
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 11 16:13:05 UTC 2024
    - 46.7K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/CompactHashSet.java

        }
        int mask = hashTableMask();
        int index =
            CompactHashing.remove(
                object,
                /* value= */ null,
                mask,
                requireTable(),
                requireEntries(),
                requireElements(),
                /* values= */ null);
        if (index == -1) {
          return false;
        }
    
        moveLastEntry(index, mask);
        size--;
        incrementModCount();
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 28 18:11:09 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/Striped64.java

              }
              collide = false;
              continue; // Retry with expanded table
            }
            h ^= h << 13; // Rehash
            h ^= h >>> 17;
            h ^= h << 5;
            hc[0] = h; // Record index for next time
          } else if (busy == 0 && cells == as && casBusy()) {
            boolean init = false;
            try { // Initialize table
              if (cells == as) {
                Cell[] rs = new Cell[2];
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Jun 07 22:25:23 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

        boolean foundProblem = false;
        try {
          new NullPointerTester().testMethodParameter(new OneArg(), method, 0);
        } catch (AssertionError expected) {
          assertThat(expected.getMessage()).contains("index 0");
          assertThat(expected.getMessage()).contains("[null]");
          foundProblem = true;
        }
        assertTrue("Should report error when different exception is thrown", foundProblem);
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 11 16:13:05 UTC 2024
    - 47.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Iterables.java

        // Here we know that:
        // * (to < from) and that both are valid indices.
        // * Everything with (index < to) should be kept.
        // * Everything with (to <= index < from) should be removed.
        // * The element with (index == from) should be kept.
        // * Everything with (index > from) has not been checked yet.
    
        // Check from the end of the list backwards (minimize expected cost of
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 24 19:38:27 UTC 2024
    - 42.8K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java

          Object expected = expectedIterator.next();
    
          assertTrue(
              "index " + i + " expected <" + expected + "., actual is exhausted",
              actualIterator.hasNext());
    
          Object actual = actualIterator.next();
          assertEquals("index " + i, expected, actual);
          i++;
        }
        if (actualIterator.hasNext()) {
          fail("index " + i + ", expected is exhausted, actual <" + actualIterator.next() + ">");
        }
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 20:31:37 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java

          Object expected = expectedIterator.next();
    
          assertTrue(
              "index " + i + " expected <" + expected + "., actual is exhausted",
              actualIterator.hasNext());
    
          Object actual = actualIterator.next();
          assertEquals("index " + i, expected, actual);
          i++;
        }
        if (actualIterator.hasNext()) {
          fail("index " + i + ", expected is exhausted, actual <" + actualIterator.next() + ">");
        }
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 20:31:37 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        source.append(newPreFilledByteArray(5, 10));
    
        // The stream reports no bytes... importantly, it doesn't read the byte at index 5 when it
        // should be reading the byte at index 10.
        // We could use a custom InputStream instead to make the read start at index 10, but since this
        // is a racy situation anyway, this behavior seems reasonable.
        assertEquals(-1, in.read());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java

                        List<String> order = new ArrayList<>();
                        for (String s : insertionOrder) {
                          int index = order.indexOf(s);
                          if (index == -1) {
                            order.add(s);
                          } else {
                            order.add(index, s);
                          }
                        }
                        return order;
                      }
                    })
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 17 15:27:58 UTC 2024
    - 25K bytes
    - Viewed (0)
Back to top