- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 196 for indexOf (0.11 sec)
-
android/guava-testlib/src/com/google/common/collect/testing/testers/ListIndexOfTester.java
array[getNumElements() / 2] = e0(); collection = getSubjectGenerator().create(array); assertEquals( "indexOf(duplicate) should return index of first occurrence", 0, getList().indexOf(e0())); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jan 09 20:10:38 UTC 2018 - 2.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java
assertThat(iia.indexOf(1)).isEqualTo(0); assertThat(iia.indexOf(8)).isEqualTo(5); assertThat(iia.indexOf(4)).isEqualTo(-1); assertThat(ImmutableDoubleArray.of(13).indexOf(13)).isEqualTo(0); assertThat(ImmutableDoubleArray.of().indexOf(21)).isEqualTo(-1); assertThat(iia.subArray(1, 5).indexOf(1)).isEqualTo(0); } public void testIndexOf_specialValues() {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jun 06 15:23:21 UTC 2023 - 20K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/MapReplaceAllTester.java
(K k, V v) -> { int index = keys().asList().indexOf(k); return values().asList().get(index + 1); }); List<Entry<K, V>> expectedEntries = new ArrayList<>(); for (Entry<K, V> entry : getSampleEntries()) { int index = keys().asList().indexOf(entry.getKey()); expectedEntries.add(Helpers.mapEntry(entry.getKey(), values().asList().get(index + 1))); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Oct 01 17:18:04 UTC 2021 - 4.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/ShortsTest.java
public void testIndexOf() { assertThat(Shorts.indexOf(EMPTY, (short) 1)).isEqualTo(-1); assertThat(Shorts.indexOf(ARRAY1, (short) 2)).isEqualTo(-1); assertThat(Shorts.indexOf(ARRAY234, (short) 1)).isEqualTo(-1); assertThat(Shorts.indexOf(new short[] {(short) -1}, (short) -1)).isEqualTo(0); assertThat(Shorts.indexOf(ARRAY234, (short) 2)).isEqualTo(0); assertThat(Shorts.indexOf(ARRAY234, (short) 3)).isEqualTo(1);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 29 15:43:06 UTC 2024 - 26.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/LongsTest.java
assertThat(Longs.indexOf(ARRAY1, ARRAY1)).isEqualTo(0); assertThat(Longs.indexOf(ARRAY234, ARRAY234)).isEqualTo(0); assertThat(Longs.indexOf(ARRAY234, new long[] {(long) 2, (long) 3})).isEqualTo(0); assertThat(Longs.indexOf(ARRAY234, new long[] {(long) 3, (long) 4})).isEqualTo(1); assertThat(Longs.indexOf(ARRAY234, new long[] {(long) 3})).isEqualTo(1);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Feb 20 17:00:05 UTC 2024 - 30K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/ListRemoveTester.java
collection = getSubjectGenerator().create(arrayAndDuplicate.elements); E duplicate = arrayAndDuplicate.duplicate; int firstIndex = getList().indexOf(duplicate); int initialSize = getList().size(); assertTrue("remove(present) should return true", getList().remove(duplicate)); assertTrue(
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jan 09 20:10:38 UTC 2018 - 2.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java
if (occurrences == 0) { return count(element); } checkArgument(occurrences > 0, "occurrences cannot be negative: %s", occurrences); int entryIndex = backingMap.indexOf(element); if (entryIndex == -1) { backingMap.put(element, occurrences); size += occurrences; return 0; } int oldCount = backingMap.getValue(entryIndex);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Mar 06 16:06:58 UTC 2023 - 8.2K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Bytes.java
} /** * Returns the index of the first appearance of the value {@code target} in {@code array}. * * @param array an array of {@code byte} values, possibly empty * @param target a primitive {@code byte} value * @return the least index {@code i} for which {@code array[i] == target}, or {@code -1} if no * such index exists. */ public static int indexOf(byte[] array, byte target) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 15 16:12:13 UTC 2024 - 14.9K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/ListRemoveTester.java
collection = getSubjectGenerator().create(arrayAndDuplicate.elements); E duplicate = arrayAndDuplicate.duplicate; int firstIndex = getList().indexOf(duplicate); int initialSize = getList().size(); assertTrue("remove(present) should return true", getList().remove(duplicate)); assertTrue(
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jan 09 20:10:38 UTC 2018 - 2.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java
public abstract class AbstractListIndexOfTester<E> extends AbstractListTester<E> { /** Override to call {@code indexOf()} or {@code lastIndexOf()}. */ protected abstract int find(@Nullable Object o); /** Override to return "indexOf" or "lastIndexOf()" for use in failure messages. */ protected abstract String getMethodName(); @CollectionSize.Require(absent = ZERO)
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Apr 20 11:19:03 UTC 2023 - 3.2K bytes - Viewed (0)