Home | History | Annotate | Download | only in collect

Lines Matching refs:occurrences

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.
117 * @param element the element to add occurrences of; may be null only if
119 * @param occurrences the number of occurrences of the element to add. May be
122 * @throws IllegalArgumentException if {@code occurrences} is negative, or if
124 * occurrences of the element
127 * occurrences} is zero, the implementation may opt to return normally.
129 int add(@Nullable E element, int occurrences);
132 * Removes a number of occurrences of the specified element from this
133 * multiset. If the multiset contains fewer than this number of occurrences to
134 * begin with, all occurrences will be removed. Note that if
135 * {@code occurrences == 1}, this is functionally equivalent to the call
138 * @param element the element to conditionally remove occurrences of
139 * @param occurrences the number of occurrences of the element to remove. May
142 * @throws IllegalArgumentException if {@code occurrences} is negative
144 int remove(@Nullable Object element, int occurrences);
147 * Adds or removes the necessary occurrences of an element such that the
150 * @param element the element to add or remove occurrences of; may be null
192 * cause <b>all</b> occurrences of the removed element(s) to be removed from
250 * it will return zero if all occurrences of the element were since removed
361 * true} even if {@code elements} contains several occurrences of an element
389 * @throws IllegalArgumentException if {@link Integer#MAX_VALUE} occurrences