Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 122 for lastIndexOf (0.07 sec)

  1. 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. build-logic-commons/basics/src/main/kotlin/gradlebuild/basics/tasks/ClasspathManifest.kt

                properties["optional"] = optional.joinForProperties()
            }
        }
    
        private
        fun FileSystemLocation.toGradleModuleName(): String = asFile.name.run { substring(0, lastIndexOf('-')) }
    
        private
        fun Iterable<String>.joinForProperties() = sorted().joinToString(",")
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Thu Mar 28 20:26:58 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  3. 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)
  4. compat/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java

                        module = module.substring(0, module.lastIndexOf('/') + 1);
                    }
    
                    String moduleName = module;
                    if (moduleName.endsWith("/")) {
                        moduleName = moduleName.substring(0, moduleName.length() - 1);
                    }
    
                    int lastSlash = moduleName.lastIndexOf('/');
    
                    moduleName = moduleName.substring(lastSlash + 1);
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/primitives/IntsTest.java

      public void testLastIndexOf() {
        assertThat(Ints.lastIndexOf(EMPTY, (int) 1)).isEqualTo(-1);
        assertThat(Ints.lastIndexOf(ARRAY1, (int) 2)).isEqualTo(-1);
        assertThat(Ints.lastIndexOf(ARRAY234, (int) 1)).isEqualTo(-1);
        assertThat(Ints.lastIndexOf(new int[] {(int) -1}, (int) -1)).isEqualTo(0);
        assertThat(Ints.lastIndexOf(ARRAY234, (int) 2)).isEqualTo(0);
        assertThat(Ints.lastIndexOf(ARRAY234, (int) 3)).isEqualTo(1);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 29.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/primitives/LongsTest.java

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

       *     such index exists.
       */
      public static int lastIndexOf(char[] array, char target) {
        return lastIndexOf(array, target, 0, array.length);
      }
    
      // TODO(kevinb): consider making this public
      private static int lastIndexOf(char[] array, char target, int start, int end) {
        for (int i = end - 1; i >= start; i--) {
          if (array[i] == target) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 27 16:47:48 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/primitives/Ints.java

       *     such index exists.
       */
      public static int lastIndexOf(int[] array, int target) {
        return lastIndexOf(array, target, 0, array.length);
      }
    
      // TODO(kevinb): consider making this public
      private static int lastIndexOf(int[] array, int target, int start, int end) {
        for (int i = end - 1; i >= start; i--) {
          if (array[i] == target) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 31K bytes
    - Viewed (0)
  9. guava/src/com/google/common/primitives/Bytes.java

       *     such index exists.
       */
      public static int lastIndexOf(byte[] array, byte target) {
        return lastIndexOf(array, target, 0, array.length);
      }
    
      // TODO(kevinb): consider making this public
      private static int lastIndexOf(byte[] array, byte target, int start, int end) {
        for (int i = end - 1; i >= start; i--) {
          if (array[i] == target) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 27 16:47:48 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  10. android/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
    - 22.2K bytes
    - Viewed (0)
Back to top