- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for occurrences (0.04 sec)
-
guava/src/com/google/common/collect/EnumMultiset.java
@Override public int add(E element, int occurrences) { checkIsE(element); checkNonnegative(occurrences, "occurrences"); if (occurrences == 0) { return count(element); } int index = element.ordinal(); int oldCount = counts[index]; long newCount = (long) oldCount + occurrences; checkArgument(newCount <= Integer.MAX_VALUE, "too many occurrences: %s", newCount);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 9.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/SimpleAbstractMultisetTest.java
} @Override public int add(E element, int occurrences) { checkArgument(occurrences >= 0); Integer frequency = backingMap.getOrDefault(element, 0); if (occurrences == 0) { return frequency; } checkArgument(occurrences <= Integer.MAX_VALUE - frequency); backingMap.put(element, frequency + occurrences); return frequency; } @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 5.6K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/AbstractContainerTester.java
* words, for the default {@code expectContents()} implementation, the number of occurrences of * each given element has increased by one since the test collection was created, and the number * of occurrences of all other elements has not changed. * * <p>Note: This means that a test like the following will fail if {@code collection} is a {@code * Set}:
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 8.9K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/AbstractContainerTester.java
* words, for the default {@code expectContents()} implementation, the number of occurrences of * each given element has increased by one since the test collection was created, and the number * of occurrences of all other elements has not changed. * * <p>Note: This means that a test like the following will fail if {@code collection} is a {@code * Set}:
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 8.9K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultisetIteratorTester.java
import org.jspecify.annotations.Nullable; import org.junit.Ignore; /** * Tester to make sure the {@code iterator().remove()} implementation of {@code Multiset} works when * there are multiple occurrences of elements. * * @author Louis Wasserman */ @GwtCompatible @Ignore("test runners must not instantiate and run this directly, only via suites we build")
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 4.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultisetIteratorTester.java
import org.jspecify.annotations.Nullable; import org.junit.Ignore; /** * Tester to make sure the {@code iterator().remove()} implementation of {@code Multiset} works when * there are multiple occurrences of elements. * * @author Louis Wasserman */ @GwtCompatible @Ignore("test runners must not instantiate and run this directly, only via suites we build")
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 4.5K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/ListIndexOfTester.java
E[] array = createSamplesArray(); array[getNumElements() / 2] = e0(); collection = getSubjectGenerator().create(array); assertEquals( "indexOf(duplicate) should return index of first occurrence", 0, getList().indexOf(e0())); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 2.2K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/ListIndexOfTester.java
E[] array = createSamplesArray(); array[getNumElements() / 2] = e0(); collection = getSubjectGenerator().create(array); assertEquals( "indexOf(duplicate) should return index of first occurrence", 0, getList().indexOf(e0())); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 2.2K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/ListLastIndexOfTester.java
E[] array = createSamplesArray(); array[getNumElements() / 2] = e0(); collection = getSubjectGenerator().create(array); assertEquals( "lastIndexOf(duplicate) should return index of last occurrence", getNumElements() / 2, getList().lastIndexOf(e0())); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 2.2K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/ListLastIndexOfTester.java
E[] array = createSamplesArray(); array[getNumElements() / 2] = e0(); collection = getSubjectGenerator().create(array); assertEquals( "lastIndexOf(duplicate) should return index of last occurrence", getNumElements() / 2, getList().lastIndexOf(e0())); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 2.2K bytes - Viewed (0)