Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 112 for lastIndexOf (0.08 sec)

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

    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class ListLastIndexOfTester<E> extends AbstractListIndexOfTester<E> {
      @Override
      protected int find(Object o) {
        return getList().lastIndexOf(o);
      }
    
      @Override
      protected String getMethodName() {
        return "lastIndexOf";
      }
    
      @CollectionFeature.Require(absent = REJECTS_DUPLICATES_AT_CREATION)
      @CollectionSize.Require(absent = {ZERO, ONE})
      public void testLastIndexOf_duplicate() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/testers/ListLastIndexOfTester.java

    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class ListLastIndexOfTester<E> extends AbstractListIndexOfTester<E> {
      @Override
      protected int find(Object o) {
        return getList().lastIndexOf(o);
      }
    
      @Override
      protected String getMethodName() {
        return "lastIndexOf";
      }
    
      @CollectionFeature.Require(absent = REJECTS_DUPLICATES_AT_CREATION)
      @CollectionSize.Require(absent = {ZERO, ONE})
      public void testLastIndexOf_duplicate() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/primitives/BytesTest.java

        assertThat(Bytes.lastIndexOf(EMPTY, (byte) 1)).isEqualTo(-1);
        assertThat(Bytes.lastIndexOf(ARRAY1, (byte) 2)).isEqualTo(-1);
        assertThat(Bytes.lastIndexOf(ARRAY234, (byte) 1)).isEqualTo(-1);
        assertThat(Bytes.lastIndexOf(new byte[] {(byte) -1}, (byte) -1)).isEqualTo(0);
        assertThat(Bytes.lastIndexOf(ARRAY234, (byte) 2)).isEqualTo(0);
        assertThat(Bytes.lastIndexOf(ARRAY234, (byte) 3)).isEqualTo(1);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/ImmutableSortedAsList.java

        return (ImmutableSortedSet<E>) super.delegateCollection();
      }
    
      @Override
      public Comparator<? super E> comparator() {
        return delegateCollection().comparator();
      }
    
      // Override indexOf() and lastIndexOf() to be O(log N) instead of O(N).
    
      @GwtIncompatible // ImmutableSortedSet.indexOf
      // TODO(cpovirk): consider manual binary search under GWT to preserve O(log N) lookup
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/ThreadFactoryBuilderTest.java

        Thread thread2 = threadFactory.newThread(monitoredRunnable);
        checkThreadPoolName(thread2, 2);
        assertEquals(
            thread.getName().substring(0, thread.getName().lastIndexOf('-')),
            thread2.getName().substring(0, thread.getName().lastIndexOf('-')));
    
        // Building again should give us a different pool ID.
        ThreadFactory threadFactory2 = builder.build();
        Thread thread3 = threadFactory2.newThread(monitoredRunnable);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/ThreadFactoryBuilderTest.java

        Thread thread2 = threadFactory.newThread(monitoredRunnable);
        checkThreadPoolName(thread2, 2);
        assertEquals(
            thread.getName().substring(0, thread.getName().lastIndexOf('-')),
            thread2.getName().substring(0, thread.getName().lastIndexOf('-')));
    
        // Building again should give us a different pool ID.
        ThreadFactory threadFactory2 = builder.build();
        Thread thread3 = threadFactory2.newThread(monitoredRunnable);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/primitives/BytesTest.java

        assertThat(Bytes.lastIndexOf(EMPTY, (byte) 1)).isEqualTo(-1);
        assertThat(Bytes.lastIndexOf(ARRAY1, (byte) 2)).isEqualTo(-1);
        assertThat(Bytes.lastIndexOf(ARRAY234, (byte) 1)).isEqualTo(-1);
        assertThat(Bytes.lastIndexOf(new byte[] {(byte) -1}, (byte) -1)).isEqualTo(0);
        assertThat(Bytes.lastIndexOf(ARRAY234, (byte) 2)).isEqualTo(0);
        assertThat(Bytes.lastIndexOf(ARRAY234, (byte) 3)).isEqualTo(1);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/SortedListsTest.java

            if (list.contains(key)) {
              assertEquals(list.lastIndexOf(key), answer);
              return;
            }
            break;
          case ANY_PRESENT:
            if (list.contains(key)) {
              assertEquals(key, list.get(answer));
              return;
            }
            break;
          case FIRST_AFTER:
            if (list.contains(key)) {
              assertEquals(list.lastIndexOf(key) + 1, answer);
              return;
            }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java

        assertThat(iia.lastIndexOf(1)).isEqualTo(1);
        assertThat(iia.lastIndexOf(8)).isEqualTo(5);
        assertThat(iia.lastIndexOf(4)).isEqualTo(-1);
        assertThat(ImmutableDoubleArray.of(13).lastIndexOf(13)).isEqualTo(0);
        assertThat(ImmutableDoubleArray.of().lastIndexOf(21)).isEqualTo(-1);
        assertThat(iia.subArray(1, 5).lastIndexOf(1)).isEqualTo(0);
      }
    
      public void testContains() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/primitives/DoublesTest.java

      }
    
      public void testLastIndexOf() {
        assertThat(Doubles.lastIndexOf(EMPTY, (double) 1)).isEqualTo(-1);
        assertThat(Doubles.lastIndexOf(ARRAY1, (double) 2)).isEqualTo(-1);
        assertThat(Doubles.lastIndexOf(ARRAY234, (double) 1)).isEqualTo(-1);
        assertThat(Doubles.lastIndexOf(new double[] {(double) -1}, (double) -1)).isEqualTo(0);
        assertThat(Doubles.lastIndexOf(ARRAY234, (double) 2)).isEqualTo(0);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 32.2K bytes
    - Viewed (0)
Back to top