- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 100 for setCount (0.15 sec)
-
guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 5.8K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableSortedMultiset.java
* @throws IllegalArgumentException if {@code count} is negative */ @CanIgnoreReturnValue @Override public Builder<E> setCount(E element, int count) { super.setCount(element, count); return this; } /** * Adds each element of {@code elements} to the {@code ImmutableSortedMultiset}. *
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 29.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java
} public void testBuilderSetCount() { ImmutableMultiset<String> multiset = new ImmutableMultiset.Builder<String>().add("a").setCount("a", 2).setCount("b", 3).build(); assertEquals(HashMultiset.create(asList("a", "a", "b", "b", "b")), multiset); } public void testBuilderAddHandlesNullsCorrectly() {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Mar 07 18:34:03 GMT 2024 - 25.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ObjectCountHashMap.java
} @SuppressWarnings("unchecked") // values only contains Vs @Override public int getCount() { updateLastKnownIndex(); return (lastKnownIndex == -1) ? 0 : values[lastKnownIndex]; } @SuppressWarnings("unchecked") // values only contains Vs @CanIgnoreReturnValue public int setCount(int count) { updateLastKnownIndex(); if (lastKnownIndex == -1) { put(key, count);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Jun 01 22:07:10 GMT 2021 - 15K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/AbstractMultiset.java
throw new UnsupportedOperationException(); } @CanIgnoreReturnValue @Override public int setCount(@ParametricNullness E element, int count) { return setCountImpl(this, element, count); } @CanIgnoreReturnValue @Override public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) { return setCountImpl(this, element, oldCount, newCount); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Jun 01 22:07:10 GMT 2021 - 6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java
when(backingMap.remove(KEY, current)).thenReturn(true); assertEquals(countToRemove, multiset.setCount(KEY, 0)); assertEquals(0, current.get()); } public void testSetCount_0_nonePresent() { when(backingMap.get(KEY)).thenReturn(null); assertEquals(0, multiset.setCount(KEY, 0)); } public void testCreate() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 14.2K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultisetNavigationTester.java
assertEquals(0, multiset.remove(entry.getElement(), entry.getCount())); assertFalse(multiset.remove(entry.getElement())); assertFalse(multiset.elementSet().remove(entry.getElement())); } void expectSetCountFailure(SortedMultiset<E> multiset, Entry<E> entry) { try { multiset.setCount(entry.getElement(), multiset.count(entry.getElement()));
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 25.9K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java
* We keep an array of elements and counts. Periodically -- when we need more room in the * array, or when we're building, or the like -- we sort, deduplicate, and combine the counts. * Negative counts indicate a setCount operation with ~counts[i]. */ private final Comparator<? super E> comparator; @VisibleForTesting E[] elements; private int[] counts; /*
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed May 01 18:44:57 GMT 2024 - 35.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/EnumMultiset.java
} else { counts[index] = oldCount - occurrences; size -= occurrences; } return oldCount; } // Modification Operations @CanIgnoreReturnValue @Override public int setCount(E element, int count) { checkIsE(element); checkNonnegative(count, "count"); int index = element.ordinal(); int oldCount = counts[index]; counts[index] = count; size += count - oldCount;
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java
assertEquals(1, listenerLatch.getCount()); assertFalse(task.isDone()); assertFalse(task.isCancelled()); // Start the task to put it in the RUNNING state. Have to use a separate // thread because the task will block on the task latch after unblocking // the run latch. exec.execute(task); runLatch.await(); assertEquals(1, listenerLatch.getCount()); assertFalse(task.isDone());
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 4.7K bytes - Viewed (0)