Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for lastIndexOf (0.1 sec)

  1. 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)
  2. android/guava-testlib/src/com/google/common/collect/testing/testers/ListSubListTester.java

        assertEquals(size - 1, copy.lastIndexOf(list.get(size - 1)));
        assertEquals(size - 2, head.lastIndexOf(list.get(size - 2)));
        assertEquals(size - 2, tail.lastIndexOf(list.get(size - 1)));
        // The following assumes all elements are distinct.
        assertEquals(0, copy.lastIndexOf(list.get(0)));
        assertEquals(0, head.lastIndexOf(list.get(0)));
        assertEquals(0, tail.lastIndexOf(list.get(1)));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/testers/ListSubListTester.java

        assertEquals(size - 1, copy.lastIndexOf(list.get(size - 1)));
        assertEquals(size - 2, head.lastIndexOf(list.get(size - 2)));
        assertEquals(size - 2, tail.lastIndexOf(list.get(size - 1)));
        // The following assumes all elements are distinct.
        assertEquals(0, copy.lastIndexOf(list.get(0)));
        assertEquals(0, head.lastIndexOf(list.get(0)));
        assertEquals(0, tail.lastIndexOf(list.get(1)));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. compat/maven-compat/src/test/java/org/apache/maven/project/inheritance/AbstractProjectInheritanceTestCase.java

        protected String getTestSeries() {
            String className = getClass().getPackage().getName();
    
            return className.substring(className.lastIndexOf('.') + 1);
        }
    
        protected File projectFile(String name) {
            return projectFile("maven", name);
        }
    
        protected File projectFile(String groupId, String artifactId) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  5. compat/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java

        }
    
        public static String toSnapshotVersion(String version) {
            notBlank(version, "version can neither be null, empty nor blank");
    
            int lastHyphen = version.lastIndexOf('-');
            if (lastHyphen > 0) {
                int prevHyphen = version.lastIndexOf('-', lastHyphen - 1);
                if (prevHyphen > 0) {
                    Matcher m = Artifact.VERSION_FILE_PATTERN.matcher(version);
                    if (m.matches()) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/primitives/ImmutableLongArray.java

        }
        return -1;
      }
    
      /**
       * Returns the largest index for which {@link #get} returns {@code target}, or {@code -1} if no
       * such index exists. Equivalent to {@code asList().lastIndexOf(target)}.
       */
      public int lastIndexOf(long target) {
        for (int i = end - 1; i >= start; i--) {
          if (array[i] == target) {
            return i - start;
          }
        }
        return -1;
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  7. guava/src/com/google/common/primitives/ImmutableIntArray.java

        }
        return -1;
      }
    
      /**
       * Returns the largest index for which {@link #get} returns {@code target}, or {@code -1} if no
       * such index exists. Equivalent to {@code asList().lastIndexOf(target)}.
       */
      public int lastIndexOf(int target) {
        for (int i = end - 1; i >= start; i--) {
          if (array[i] == target) {
            return i - start;
          }
        }
        return -1;
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java

        assertThat(iia.lastIndexOf(1)).isEqualTo(1);
        assertThat(iia.lastIndexOf(8)).isEqualTo(5);
        assertThat(iia.lastIndexOf(4)).isEqualTo(-1);
        assertThat(ImmutableIntArray.of(13).lastIndexOf(13)).isEqualTo(0);
        assertThat(ImmutableIntArray.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
    - 20.1K bytes
    - Viewed (0)
  9. 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. compat/maven-model-builder/src/main/java/org/apache/maven/model/building/Graph.java

                    } else if (state == DfsState.VISITING) {
                        // we are already visiting this vertex, this mean we have a cycle
                        int pos = cycle.lastIndexOf(v);
                        List<String> ret = cycle.subList(pos, cycle.size());
                        ret.add(v);
                        return ret;
                    }
                }
            }
            return null;
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 3.4K bytes
    - Viewed (0)
Back to top