- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for setCounts (0.16 sec)
-
android/guava/src/com/google/common/collect/TreeMultiset.java
} int[] result = new int[1]; // used as a mutable int reference to hold result AvlNode<E> newRoot = root.setCount(comparator(), element, count, result); rootReference.checkAndSet(root, newRoot); return result[0]; } @CanIgnoreReturnValue @Override public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) { checkNonnegative(newCount, "newCount");
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 34.2K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableMultiset.java
* @throws NullPointerException if {@code element} is null * @throws IllegalArgumentException if {@code count} is negative */ @CanIgnoreReturnValue public Builder<E> setCount(E element, int count) { contents.setCount(checkNotNull(element), count); return this; } /** * Adds each element of {@code elements} to the {@code ImmutableMultiset}. *
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 20.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Multisets.java
@Override public void clear() { throw new UnsupportedOperationException(); } @Override public int setCount(@ParametricNullness E element, int count) { throw new UnsupportedOperationException(); } @Override public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) { throw new UnsupportedOperationException(); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed May 01 18:44:57 GMT 2024 - 41.7K bytes - Viewed (0) -
android/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 May 03 12:43:13 GMT 2024 - Last Modified: Thu Mar 07 18:34:03 GMT 2024 - 21K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Synchronized.java
} } @Override public int setCount(@ParametricNullness E element, int count) { synchronized (mutex) { return delegate().setCount(element, count); } } @Override public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) { synchronized (mutex) { return delegate().setCount(element, oldCount, newCount); } }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 53.4K bytes - Viewed (0) -
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 Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 9.3K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableMultiset.java
* @deprecated Unsupported operation. */ @CanIgnoreReturnValue @Deprecated @Override @DoNotCall("Always throws UnsupportedOperationException") public final int setCount(E element, int count) { throw new UnsupportedOperationException(); } /** * Guaranteed to throw an exception and leave the collection unmodified. *
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed May 01 18:44:57 GMT 2024 - 22.6K 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/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)