Home
last modified time | relevance | path

Searched refs:occurrences (Results 1 – 25 of 64) sorted by relevance

123

/external/guava/guava-tests/benchmark/com/google/common/collect/
DConcurrentHashMultisetBenchmark.java248 @Override public int add(E element, int occurrences) {
249 if (occurrences == 0) {
252 checkArgument(occurrences > 0, "Invalid occurrences: %s", occurrences);
257 if (countMap.putIfAbsent(element, occurrences) == null) {
261 checkArgument(occurrences <= Integer.MAX_VALUE - current,
263 occurrences, current);
264 int next = current + occurrences;
283 @Override public int remove(@Nullable Object element, int occurrences) {
284 if (occurrences == 0) {
287 checkArgument(occurrences > 0, "Invalid occurrences: %s", occurrences);
[all …]
/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
DAbstractMapBasedMultiset.java211 @Override public int add(@Nullable E element, int occurrences) {
212 if (occurrences == 0) {
216 occurrences > 0, "occurrences cannot be negative: %s", occurrences);
221 backingMap.put(element, new Count(occurrences));
224 long newCount = (long) oldCount + (long) occurrences;
227 frequency.getAndAdd(occurrences);
229 size += occurrences;
233 @Override public int remove(@Nullable Object element, int occurrences) {
234 if (occurrences == 0) {
238 occurrences > 0, "occurrences cannot be negative: %s", occurrences);
[all …]
DTreeMultiset.java241 public int add(@Nullable E element, int occurrences) { in add() argument
242 checkNonnegative(occurrences, "occurrences"); in add()
243 if (occurrences == 0) { in add()
250 AvlNode<E> newRoot = new AvlNode<E>(element, occurrences); in add()
256 AvlNode<E> newRoot = root.add(comparator(), element, occurrences, result); in add()
262 public int remove(@Nullable Object element, int occurrences) { in remove() argument
263 checkNonnegative(occurrences, "occurrences"); in remove()
264 if (occurrences == 0) { in remove()
276 newRoot = root.remove(comparator(), e, occurrences, result); in remove()
DImmutableMultiset.java279 public final int add(E element, int occurrences) { in add() argument
291 public final int remove(Object element, int occurrences) { in remove() argument
516 public Builder<E> addCopies(E element, int occurrences) {
517 contents.add(checkNotNull(element), occurrences);
/external/guava/guava/src/com/google/common/collect/
DAbstractMapBasedMultiset.java214 @Override public int add(@Nullable E element, int occurrences) {
215 if (occurrences == 0) {
219 occurrences > 0, "occurrences cannot be negative: %s", occurrences);
224 backingMap.put(element, new Count(occurrences));
227 long newCount = (long) oldCount + (long) occurrences;
230 frequency.getAndAdd(occurrences);
232 size += occurrences;
236 @Override public int remove(@Nullable Object element, int occurrences) {
237 if (occurrences == 0) {
241 occurrences > 0, "occurrences cannot be negative: %s", occurrences);
[all …]
DConcurrentHashMultiset.java211 @Override public int add(E element, int occurrences) { in add() argument
213 if (occurrences == 0) { in add()
216 checkArgument(occurrences > 0, "Invalid occurrences: %s", occurrences); in add()
221 existingCounter = countMap.putIfAbsent(element, new AtomicInteger(occurrences)); in add()
232 int newValue = IntMath.checkedAdd(oldValue, occurrences); in add()
238 throw new IllegalArgumentException("Overflow adding " + occurrences in add()
245 AtomicInteger newCounter = new AtomicInteger(occurrences); in add()
276 @Override public int remove(@Nullable Object element, int occurrences) { in remove() argument
277 if (occurrences == 0) { in remove()
280 checkArgument(occurrences > 0, "Invalid occurrences: %s", occurrences); in remove()
[all …]
DForwardingMultiset.java66 public int add(E element, int occurrences) { in add() argument
67 return delegate().add(element, occurrences); in add()
71 public int remove(Object element, int occurrences) { in remove() argument
72 return delegate().remove(element, occurrences); in remove()
DMultiset.java129 int add(@Nullable E element, int occurrences); in add() argument
144 int remove(@Nullable Object element, int occurrences); in remove() argument
DTreeMultiset.java245 public int add(@Nullable E element, int occurrences) { in add() argument
246 checkNonnegative(occurrences, "occurrences"); in add()
247 if (occurrences == 0) { in add()
254 AvlNode<E> newRoot = new AvlNode<E>(element, occurrences); in add()
260 AvlNode<E> newRoot = root.add(comparator(), element, occurrences, result); in add()
266 public int remove(@Nullable Object element, int occurrences) { in remove() argument
267 checkNonnegative(occurrences, "occurrences"); in remove()
268 if (occurrences == 0) { in remove()
280 newRoot = root.remove(comparator(), e, occurrences, result); in remove()
DImmutableMultiset.java280 public final int add(E element, int occurrences) { in add() argument
292 public final int remove(Object element, int occurrences) { in remove() argument
527 public Builder<E> addCopies(E element, int occurrences) {
528 contents.add(checkNotNull(element), occurrences);
DMultisets.java155 @Override public int remove(Object element, int occurrences) { in remove() argument
329 public int add(@Nullable E element, int occurrences) { in add() argument
332 return unfiltered.add(element, occurrences); in add()
336 public int remove(@Nullable Object element, int occurrences) { in remove() argument
337 checkNonnegative(occurrences, "occurrences"); in remove()
338 if (occurrences == 0) { in remove()
341 return contains(element) ? unfiltered.remove(element, occurrences) : 0; in remove()
/external/icu/icu4c/source/test/intltest/
Dustrtest.cpp715 uint16_t occurrences = 0; in TestSearching() local
719 (startPos = test1.indexOf(test2, startPos)) != -1 ? (++occurrences, startPos += 4) : 0) in TestSearching()
721 if (occurrences != 6) in TestSearching()
722 … errln(UnicodeString("indexOf failed: expected to find 6 occurrences, found ") + occurrences); in TestSearching()
724 for ( occurrences = 0, startPos = 10; in TestSearching()
726 (startPos = test1.indexOf(test2, startPos)) != -1 ? (++occurrences, startPos += 4) : 0) in TestSearching()
728 if (occurrences != 4) in TestSearching()
730 "expected to find 4 occurrences, found ") + occurrences); in TestSearching()
733 for ( occurrences = 0, startPos = 5; in TestSearching()
735 …(startPos = test1.indexOf(test2, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos +=… in TestSearching()
[all …]
/external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
DSimpleAbstractMultisetTest.java44 public int add(String element, int occurrences) { in testFastAddAllMultiset()
46 return super.add(element, occurrences); in testFastAddAllMultiset()
69 @Override public int add(@Nullable E element, int occurrences) { in add() argument
70 checkArgument(occurrences >= 0); in add()
75 if (occurrences == 0) { in add()
78 checkArgument(occurrences <= Integer.MAX_VALUE - frequency); in add()
79 backingMap.put(element, frequency + occurrences); in add()
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/
DUTF16Test.java1017 int occurrences = 0; in TestIndexOf() local
1022 ++ occurrences; in TestIndexOf()
1026 if (occurrences != 6) { in TestIndexOf()
1028 + occurrences); in TestIndexOf()
1031 occurrences = 0; in TestIndexOf()
1036 ++ occurrences; in TestIndexOf()
1040 if (occurrences != 4) { in TestIndexOf()
1042 + occurrences); in TestIndexOf()
1045 occurrences = 0; in TestIndexOf()
1050 ++ occurrences; in TestIndexOf()
[all …]
/external/guava/guava-tests/test/com/google/common/collect/
DSimpleAbstractMultisetTest.java70 public int add(String element, int occurrences) { in testFastAddAllMultiset()
72 return super.add(element, occurrences); in testFastAddAllMultiset()
95 @Override public int add(@Nullable E element, int occurrences) { in add() argument
96 checkArgument(occurrences >= 0); in add()
101 if (occurrences == 0) { in add()
104 checkArgument(occurrences <= Integer.MAX_VALUE - frequency); in add()
105 backingMap.put(element, frequency + occurrences); in add()
/external/bison/runtime-po/
Dinsert-header.sin5 # occurrences, do nothing. The distinction between the first and the following
6 # occurrences is achieved by looking at the hold space.
20 # The hold space was nonempty. Following occurrences. Do nothing.
Dremove-potcdate.sin4 # The distinction between the first and the following occurrences of the
16 # The hold space was nonempty. Following occurrences. Do nothing.
/external/e2fsprogs/po/
Dinsert-header.sin5 # occurrences, do nothing. The distinction between the first and the following
6 # occurrences is achieved by looking at the hold space.
20 # The hold space was nonempty. Following occurrences. Do nothing.
Dremove-potcdate.sin4 # The distinction between the first and the following occurrences of the
16 # The hold space was nonempty. Following occurrences. Do nothing.
/external/bison/po/
Dinsert-header.sin5 # occurrences, do nothing. The distinction between the first and the following
6 # occurrences is achieved by looking at the hold space.
20 # The hold space was nonempty. Following occurrences. Do nothing.
Dremove-potcdate.sin4 # The distinction between the first and the following occurrences of the
16 # The hold space was nonempty. Following occurrences. Do nothing.
/external/libexif/po/
Dinsert-header.sin5 # occurrences, do nothing. The distinction between the first and the following
6 # occurrences is achieved by looking at the hold space.
20 # The hold space was nonempty. Following occurrences. Do nothing.
Dremove-potcdate.sin4 # The distinction between the first and the following occurrences of the
16 # The hold space was nonempty. Following occurrences. Do nothing.
/external/elfutils/src/po/
Dinsert-header.sin5 # occurrences, do nothing. The distinction between the first and the following
6 # occurrences is achieved by looking at the hold space.
20 # The hold space was nonempty. Following occurrences. Do nothing.
Dremove-potcdate.sin4 # The distinction between the first and the following occurrences of the
16 # The hold space was nonempty. Following occurrences. Do nothing.

123