Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 1,691 for indexOf (0.18 sec)

  1. android/guava/src/com/google/common/primitives/Doubles.java

       */
      public static int indexOf(double[] array, double target) {
        return indexOf(array, target, 0, array.length);
      }
    
      // TODO(kevinb): consider making this public
      private static int indexOf(double[] array, double target, int start, int end) {
        for (int i = start; i < end; i++) {
          if (array[i] == target) {
            return i;
          }
        }
        return -1;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 27.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/net/HostAndPort.java

          String[] hostAndPort = getHostAndPortFromBracketedHost(hostPortString);
          host = hostAndPort[0];
          portString = hostAndPort[1];
        } else {
          int colonPos = hostPortString.indexOf(':');
          if (colonPos >= 0 && hostPortString.indexOf(':', colonPos + 1) == -1) {
            // Exactly 1 colon. Split into host:port.
            host = hostPortString.substring(0, colonPos);
            portString = hostPortString.substring(colonPos + 1);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Aug 22 20:55:57 GMT 2023
    - 11.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java

        ImmutableIntArray iia = ImmutableIntArray.of(1, 1, 2, 3, 5, 8);
        assertThat(iia.indexOf(1)).isEqualTo(0);
        assertThat(iia.indexOf(8)).isEqualTo(5);
        assertThat(iia.indexOf(4)).isEqualTo(-1);
        assertThat(ImmutableIntArray.of(13).indexOf(13)).isEqualTo(0);
        assertThat(ImmutableIntArray.of().indexOf(21)).isEqualTo(-1);
        assertThat(iia.subArray(1, 5).indexOf(1)).isEqualTo(0);
      }
    
      public void testLastIndexOf() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 18.9K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/convert/TimeConversionUtil.java

                    buf.append(ch);
                }
            }
            if (buf.indexOf("HH") == -1) {
                final int pos = buf.indexOf("H");
                if (pos != -1) {
                    buf.replace(pos, pos + 1, "HH");
                }
            }
            if (buf.indexOf("mm") == -1) {
                final int pos = buf.indexOf("m");
                if (pos != -1) {
                    buf.replace(pos, pos + 1, "mm");
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 21.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ObjectCountHashMap.java

      }
    
      int getValue(int index) {
        checkElementIndex(index, size);
        return values[index];
      }
    
      void setValue(int index, int newValue) {
        checkElementIndex(index, size);
        values[index] = newValue;
      }
    
      Entry<K> getEntry(int index) {
        checkElementIndex(index, size);
        return new MapEntry(index);
      }
    
      class MapEntry extends AbstractEntry<K> {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 01 22:07:10 GMT 2021
    - 15K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/IterablesTest.java

        assertEquals(0, Iterables.indexOf(list, Predicates.equalTo("mary")));
        assertEquals(1, Iterables.indexOf(list, Predicates.equalTo("bob")));
        assertEquals(-1, Iterables.indexOf(list, Predicates.equalTo("jack")));
      }
    
      public void testIndexOf_withDuplicates() {
        List<String> list = Lists.newArrayList("mary", "bob", "bob", "bob", "sam");
        assertEquals(0, Iterables.indexOf(list, Predicates.equalTo("mary")));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 46K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/ListsTest.java

      }
    
      public void testCartesianProduct_indexOf() {
        List<List<Integer>> actual = Lists.cartesianProduct(list(1, 2), list(3, 4));
        assertEquals(0, actual.indexOf(list(1, 3)));
        assertEquals(1, actual.indexOf(list(1, 4)));
        assertEquals(2, actual.indexOf(list(2, 3)));
        assertEquals(3, actual.indexOf(list(2, 4)));
        assertEquals(-1, actual.indexOf(list(3, 1)));
    
        assertEquals(-1, actual.indexOf(list(1)));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 35.2K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/dcerpc/DcerpcBinding.java

                    String iface = (String)INTERFACES.get(lep.substring(6));
                    if (iface != null) {
                        int c, p;
                        c = iface.indexOf(':');
                        p = iface.indexOf('.', c + 1);
                        uuid = new UUID(iface.substring(0, c));
                        major = Integer.parseInt(iface.substring(c + 1, p));
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 20:39:42 GMT 2019
    - 3.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/primitives/ImmutableLongArrayTest.java

        assertThat(iia.indexOf(1)).isEqualTo(0);
        assertThat(iia.indexOf(8)).isEqualTo(5);
        assertThat(iia.indexOf(4)).isEqualTo(-1);
        assertThat(ImmutableLongArray.of(13).indexOf(13)).isEqualTo(0);
        assertThat(ImmutableLongArray.of().indexOf(21)).isEqualTo(-1);
        assertThat(iia.subArray(1, 5).indexOf(1)).isEqualTo(0);
      }
    
      public void testLastIndexOf() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 20.2K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/IterablesTest.java

        assertEquals(0, Iterables.indexOf(list, Predicates.equalTo("mary")));
        assertEquals(1, Iterables.indexOf(list, Predicates.equalTo("bob")));
        assertEquals(-1, Iterables.indexOf(list, Predicates.equalTo("jack")));
      }
    
      public void testIndexOf_withDuplicates() {
        List<String> list = Lists.newArrayList("mary", "bob", "bob", "bob", "sam");
        assertEquals(0, Iterables.indexOf(list, Predicates.equalTo("mary")));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 47.5K bytes
    - Viewed (0)
Back to top