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

1 2

  /external/guava/guava-tests/test/com/google/common/collect/
SimpleAbstractMultisetTest.java 45 public int add(String element, int occurrences) {
47 return super.add(element, occurrences);
70 @Override public int add(E element, int occurrences) {
71 checkArgument(occurrences >= 0);
76 if (occurrences == 0) {
79 checkArgument(occurrences <= Integer.MAX_VALUE - frequency);
80 backingMap.put(element, frequency + occurrences);
125 @Override public int remove(Object element, int occurrences) {
126 checkArgument(occurrences >= 0);
130 } else if (count > occurrences) {
    [all...]
ForwardingMultisetTest.java 187 @Override public int add(String element, int occurrences) {
  /external/guava/guava/src/com/google/common/collect/
AbstractMapBasedMultiset.java 224 * {@link Integer#MAX_VALUE} occurrences of {@code element} in this
227 @Override public int add(@Nullable E element, int occurrences) {
228 if (occurrences == 0) {
232 occurrences > 0, "occurrences cannot be negative: %s", occurrences);
237 backingMap.put(element, new Count(occurrences));
240 long newCount = (long) oldCount + (long) occurrences;
242 "too many occurrences: %s", newCount);
243 frequency.getAndAdd(occurrences);
    [all...]
ConcurrentHashMultiset.java 63 /** The number of occurrences of each element. */
103 * applies to all occurrences of a given element as a single unit. However, most updates to the
142 * Returns the number of occurrences of {@code element} in this multiset.
145 * @return the nonnegative number of occurrences of the element
212 * Adds a number of occurrences of the specified element to this multiset.
215 * @param occurrences the number of occurrences to add
217 * @throws IllegalArgumentException if {@code occurrences} is negative, or if
220 @Override public int add(E element, int occurrences) {
221 if (occurrences == 0)
    [all...]
Multiset.java 35 * element equivalence", below) are referred to as <i>occurrences</i> of the
36 * same single element. The total number of occurrences of an element in a
40 * more than {@link Integer#MAX_VALUE} occurrences of any one element.
46 * or remove multiple occurrences of an element at once, or to set the count of
89 * Returns the number of occurrences of an element in this multiset (the
98 * @param element the element to count occurrences of
99 * @return the number of occurrences of the element in this multiset; possibly
107 * Adds a number of occurrences of an element to this multiset. Note that if
108 * {@code occurrences == 1}, this method has the identical effect to {@link
111 * 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(E element, int occurrences) {
94 public int remove(Object element, int occurrences) {
TreeMultiset.java 210 public int add(E element, int occurrences) {
212 if (occurrences == 0) {
216 return mutate(element, new AddModifier(occurrences));
220 public int remove(@Nullable Object element, int occurrences) {
223 } else if (occurrences == 0) {
228 return range.contains(e) ? mutate(e, new RemoveModifier(occurrences)) : 0;
ImmutableMultiset.java 287 public final int add(E element, int occurrences) {
297 public final int remove(Object element, int occurrences) {
545 * Adds a number of occurrences of an element to this {@code
549 * @param occurrences the number of occurrences of the element to add. May
553 * @throws IllegalArgumentException if {@code occurrences} is negative, or
555 * occurrences of the element
557 public Builder<E> addCopies(E element, int occurrences) {
558 contents.add(checkNotNull(element), occurrences); local
563 * Adds or removes the necessary occurrences of an element such that th
    [all...]
Constraints.java 355 @Override public int add(E element, int occurrences) {
357 return delegate.add(element, occurrences);
Multisets.java 152 @Override public int remove(Object element, int occurrences) {
358 public int add(E element, int occurrences) {
363 public int remove(Object element, int occurrences) {
364 if (occurrences == 0) {
367 checkArgument(occurrences > 0);
484 * element set of {@code multiset1}, with repeated occurrences of the same
569 * all occurrences of elements that appear at all in {@code
570 * multisetToRetain}, and deletes all occurrences of all other elements.
616 * removes all occurrences of elements that appear in
ImmutableSortedMultiset.java 492 * Adds a number of occurrences of an element to this {@code ImmutableSortedMultiset}.
495 * @param occurrences the number of occurrences of the element to add. May be zero, in which
499 * @throws IllegalArgumentException if {@code occurrences} is negative, or if this operation
500 * would result in more than {@link Integer#MAX_VALUE} occurrences of the element
503 public Builder<E> addCopies(E element, int occurrences) {
504 super.addCopies(element, occurrences);
509 * Adds or removes the necessary occurrences of an element such that the element attains the
512 * @param element the element to add or remove occurrences of
LinkedListMultimap.java 741 public int add(@Nullable K key, int occurrences) {
746 public int remove(@Nullable Object key, int occurrences) {
747 checkArgument(occurrences >= 0);
750 while ((occurrences-- > 0) && values.hasNext()) {
    [all...]
Multimaps.java     [all...]
  /external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
AbstractMapBasedMultiset.java 221 * {@link Integer#MAX_VALUE} occurrences of {@code element} in this
224 @Override public int add(@Nullable E element, int occurrences) {
225 if (occurrences == 0) {
229 occurrences > 0, "occurrences cannot be negative: %s", occurrences);
234 backingMap.put(element, new Count(occurrences));
237 long newCount = (long) oldCount + (long) occurrences;
239 "too many occurrences: %s", newCount);
240 frequency.getAndAdd(occurrences);
    [all...]