HomeSort by relevance Sort by last modified time
    Searched refs:occurrences (Results 1 - 25 of 303) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
SimpleAbstractMultisetTest.java 44 public int add(String element, int occurrences) {
46 return super.add(element, occurrences);
69 @Override public int add(@Nullable E element, int occurrences) {
70 checkArgument(occurrences >= 0);
75 if (occurrences == 0) {
78 checkArgument(occurrences <= Integer.MAX_VALUE - frequency);
79 backingMap.put(element, frequency + occurrences);
  /external/guava/guava/src/com/google/common/collect/
AbstractMapBasedMultiset.java 211 * {@link Integer#MAX_VALUE} occurrences of {@code element} in this
214 @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;
229 "too many occurrences: %s", newCount);
230 frequency.getAndAdd(occurrences);
    [all...]
ConcurrentHashMultiset.java 69 /** The number of occurrences of each element. */
109 * applies to all occurrences of a given element as a single unit. However, most updates to the
148 * Returns the number of occurrences of {@code element} in this multiset.
151 * @return the nonnegative number of occurrences of the element
203 * Adds a number of occurrences of the specified element to this multiset.
206 * @param occurrences the number of occurrences to add
208 * @throws IllegalArgumentException if {@code occurrences} is negative, or if
211 @Override public int add(E element, int occurrences) {
213 if (occurrences == 0)
    [all...]
Multiset.java 35 * <i>occurrences</i> of the same single element. The total number of
36 * occurrences of an element in a multiset is called the <i>count</i> of that
40 * occurrences of any one element.
46 * or remove multiple occurrences of an element at once, or to set the count of
93 * Returns the number of occurrences of an element in this multiset (the
102 * @param element the element to count occurrences of
103 * @return the number of occurrences of the element in this multiset; possibly
111 * Adds a number of occurrences of an element to this multiset. Note that if
112 * {@code occurrences == 1}, this method has the identical effect to {@link
115 * occurrences))}, which would presumably perform much more poorly
    [all...]
ForwardingMultiset.java 66 public int add(E element, int occurrences) {
67 return delegate().add(element, occurrences);
71 public int remove(Object element, int occurrences) {
72 return delegate().remove(element, occurrences);
AbstractMultiset.java 85 public int add(@Nullable E element, int occurrences) {
94 public int remove(@Nullable Object element, int occurrences) {
FilteredEntryMultimap.java 335 public int remove(@Nullable Object key, int occurrences) {
336 checkNonnegative(occurrences, "occurrences");
337 if (occurrences == 0) {
352 if (oldCount <= occurrences) {
ImmutableMultiset.java 280 public final int add(E element, int occurrences) {
292 public final int remove(Object element, int occurrences) {
515 * Adds a number of occurrences of an element to this {@code
519 * @param occurrences the number of occurrences of the element to add. May
523 * @throws IllegalArgumentException if {@code occurrences} is negative, or
525 * occurrences of the element
527 public Builder<E> addCopies(E element, int occurrences) {
528 contents.add(checkNotNull(element), occurrences);
533 * Adds or removes the necessary occurrences of an element such that th
    [all...]
TreeMultiset.java 245 public int add(@Nullable E element, int occurrences) {
246 checkNonnegative(occurrences, "occurrences");
247 if (occurrences == 0) {
254 AvlNode<E> newRoot = new AvlNode<E>(element, occurrences);
260 AvlNode<E> newRoot = root.add(comparator(), element, occurrences, result);
266 public int remove(@Nullable Object element, int occurrences) {
267 checkNonnegative(occurrences, "occurrences");
268 if (occurrences == 0)
    [all...]
Multisets.java 155 @Override public int remove(Object element, int occurrences) {
329 public int add(@Nullable E element, int occurrences) {
332 return unfiltered.add(element, occurrences);
336 public int remove(@Nullable Object element, int occurrences) {
337 checkNonnegative(occurrences, "occurrences");
338 if (occurrences == 0) {
341 return contains(element) ? unfiltered.remove(element, occurrences) : 0;
370 * not contained in {@code multiset1}, with repeated occurrences of the same
447 * occurrences of the same element appearing consecutively
    [all...]
ImmutableSortedMultiset.java 461 * Adds a number of occurrences of an element to this {@code ImmutableSortedMultiset}.
464 * @param occurrences the number of occurrences of the element to add. May be zero, in which
468 * @throws IllegalArgumentException if {@code occurrences} is negative, or if this operation
469 * would result in more than {@link Integer#MAX_VALUE} occurrences of the element
472 public Builder<E> addCopies(E element, int occurrences) {
473 super.addCopies(element, occurrences);
478 * Adds or removes the necessary occurrences of an element such that the element attains the
481 * @param element the element to add or remove occurrences of
  /external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
AbstractMapBasedMultiset.java 208 * {@link Integer#MAX_VALUE} occurrences of {@code element} in this
211 @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;
226 "too many occurrences: %s", newCount);
227 frequency.getAndAdd(occurrences);
    [all...]
ImmutableMultiset.java 279 public final int add(E element, int occurrences) {
291 public final int remove(Object element, int occurrences) {
504 * Adds a number of occurrences of an element to this {@code
508 * @param occurrences the number of occurrences of the element to add. May
512 * @throws IllegalArgumentException if {@code occurrences} is negative, or
514 * occurrences of the element
516 public Builder<E> addCopies(E element, int occurrences) {
517 contents.add(checkNotNull(element), occurrences);
522 * Adds or removes the necessary occurrences of an element such that th
    [all...]
TreeMultiset.java 241 public int add(@Nullable E element, int occurrences) {
242 checkNonnegative(occurrences, "occurrences");
243 if (occurrences == 0) {
250 AvlNode<E> newRoot = new AvlNode<E>(element, occurrences);
256 AvlNode<E> newRoot = root.add(comparator(), element, occurrences, result);
262 public int remove(@Nullable Object element, int occurrences) {
263 checkNonnegative(occurrences, "occurrences");
264 if (occurrences == 0)
    [all...]
  /external/guava/guava-tests/benchmark/com/google/common/collect/
ConcurrentHashMultisetBenchmark.java 159 /** The number of occurrences of each element. */
178 * Returns the number of occurrences of {@code element} in this multiset.
181 * @return the nonnegative number of occurrences of the element
239 * Adds a number of occurrences of the specified element to this multiset.
242 * @param occurrences the number of occurrences to add
245 * @throws IllegalArgumentException if {@code occurrences} is negative, or if
248 @Override public int add(E element, int occurrences) {
249 if (occurrences == 0) {
252 checkArgument(occurrences > 0, "Invalid occurrences: %s", occurrences)
    [all...]
  /external/guava/guava-tests/test/com/google/common/collect/
SimpleAbstractMultisetTest.java 70 public int add(String element, int occurrences) {
72 return super.add(element, occurrences);
95 @Override public int add(@Nullable E element, int occurrences) {
96 checkArgument(occurrences >= 0);
101 if (occurrences == 0) {
104 checkArgument(occurrences <= Integer.MAX_VALUE - frequency);
105 backingMap.put(element, frequency + occurrences);
  /external/icu/android_icu4j/src/main/tests/android/icu/dev/test/lang/
UTF16Test.java 1039 int occurrences = 0; local
    [all...]
  /external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/
UTF16Test.java 1036 int occurrences = 0; local
    [all...]
  /external/icu/icu4c/source/test/intltest/
ustrtest.cpp 715 uint16_t occurrences = 0; local
719 (startPos = test1.indexOf(test2, startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
721 if (occurrences != 6)
722 errln(UnicodeString("indexOf failed: expected to find 6 occurrences, found ") + occurrences);
724 for ( occurrences = 0, startPos = 10;
726 (startPos = test1.indexOf(test2, startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
728 if (occurrences != 4)
730 "expected to find 4 occurrences, found ") + occurrences);
    [all...]
  /prebuilts/go/darwin-x86/src/cmd/internal/buildid/
rewrite.go 14 // FindAndHash reads all of r and returns the offsets of occurrences of id.
16 // a hash of the content of r, but with occurrences of id replaced by zeros.
  /prebuilts/go/linux-x86/src/cmd/internal/buildid/
rewrite.go 14 // FindAndHash reads all of r and returns the offsets of occurrences of id.
16 // a hash of the content of r, but with occurrences of id replaced by zeros.
  /prebuilts/go/darwin-x86/src/index/suffixarray/
suffixarray_test.go 108 // find all occurrences of s in source; report at most n occurrences
112 // find at most n occurrences of s in src
  /prebuilts/go/linux-x86/src/index/suffixarray/
suffixarray_test.go 108 // find all occurrences of s in source; report at most n occurrences
112 // find at most n occurrences of s in src
  /prebuilts/go/darwin-x86/src/net/
parse.go 89 // Count occurrences in s of any bytes in t.
221 // Number of occurrences of b in s.
  /prebuilts/go/linux-x86/src/net/
parse.go 89 // Count occurrences in s of any bytes in t.
221 // Number of occurrences of b in s.

Completed in 686 milliseconds

1 2 3 4 5 6 7 8 91011>>