- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for oldCount (0.21 sec)
-
guava/src/com/google/common/collect/EnumMultiset.java
} int index = e.ordinal(); int oldCount = counts[index]; if (oldCount == 0) { return 0; } else if (oldCount <= occurrences) { counts[index] = 0; distinctElements--; size -= oldCount; } else { counts[index] = oldCount - occurrences; size -= occurrences; } return oldCount; } // Modification OperationsRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 9.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/AbstractMapBasedMultiset.java
Count frequency = backingMap.get(element); int oldCount; if (frequency == null) { oldCount = 0; backingMap.put(element, new Count(occurrences)); } else { oldCount = frequency.get(); long newCount = (long) oldCount + (long) occurrences; checkArgument(newCount <= Integer.MAX_VALUE, "too many occurrences: %s", newCount);
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 10.2K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultisetSetCountConditionallyTester.java
private void assertSetCountNegativeOldCount() { try { getMultiset().setCount(e3(), -1, 1); fail("calling setCount() with a negative oldCount should throw IllegalArgumentException"); } catch (IllegalArgumentException expected) { } } // Negative oldCount. @CollectionFeature.Require(SUPPORTS_ADD) public void testSetCountConditional_negativeOldCount_addSupported() { assertSetCountNegativeOldCount();
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java
checkNonnegative(count, "count"); int oldCount = (count == 0) ? backingMap.remove(element) : backingMap.put(element, count); size += (count - oldCount); return oldCount; } @Override public final boolean setCount(@ParametricNullness E element, int oldCount, int newCount) { checkNonnegative(oldCount, "oldCount"); checkNonnegative(newCount, "newCount");
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Fri Dec 05 23:15:58 UTC 2025 - 7.9K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultisetSetCountConditionallyTester.java
private void assertSetCountNegativeOldCount() { try { getMultiset().setCount(e3(), -1, 1); fail("calling setCount() with a negative oldCount should throw IllegalArgumentException"); } catch (IllegalArgumentException expected) { } } // Negative oldCount. @CollectionFeature.Require(SUPPORTS_ADD) public void testSetCountConditional_negativeOldCount_addSupported() { assertSetCountNegativeOldCount();
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ForwardingMultiset.java
return delegate().setCount(element, count); } @CanIgnoreReturnValue @Override public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) { return delegate().setCount(element, oldCount, newCount); } /** * A sensible definition of {@link #contains} in terms of {@link #count}. If you override {@link
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Jul 08 18:32:10 UTC 2025 - 10.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/Multisets.java
Multiset<E> self, @ParametricNullness E element, int oldCount, int newCount) { checkNonnegative(oldCount, "oldCount"); checkNonnegative(newCount, "newCount"); if (self.count(element) == oldCount) { self.setCount(element, newCount); return true; } else { return false; } } static <E extends @Nullable Object> Iterator<E> elementIterator(
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Sep 22 18:35:44 UTC 2025 - 41.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Multisets.java
Multiset<E> self, @ParametricNullness E element, int oldCount, int newCount) { checkNonnegative(oldCount, "oldCount"); checkNonnegative(newCount, "newCount"); if (self.count(element) == oldCount) { self.setCount(element, newCount); return true; } else { return false; } } static <E extends @Nullable Object> Iterator<E> elementIterator(
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Sep 22 18:35:44 UTC 2025 - 41.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/ForwardingMultiset.java
return delegate().setCount(element, count); } @CanIgnoreReturnValue @Override public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) { return delegate().setCount(element, oldCount, newCount); } /** * A sensible definition of {@link #contains} in terms of {@link #count}. If you override {@link
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Jul 08 18:32:10 UTC 2025 - 10.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ForwardingMultisetTest.java
} @Override public int hashCode() { return standardHashCode(); } @Override public boolean setCount(T element, int oldCount, int newCount) { return standardSetCount(element, oldCount, newCount); } @Override public int setCount(T element, int count) { return standardSetCount(element, count); } @OverrideRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 20:34:52 UTC 2025 - 11.8K bytes - Viewed (0)