Lines Matching refs:element
61 * the multiset. If the user attempts to add an element to the multiset that
63 * element to a set whose elements are integers), the {@code add(Object)}
79 * e1} and {@code e2} in the multiset. If the user attempts to add an element
174 public int count(@Nullable Object element) {
176 E e = checkElement(element);
206 public int add(E element, int occurrences) {
207 checkElement(element);
209 return count(element);
211 checkArgument(range.contains(element));
212 return mutate(element, new AddModifier(occurrences));
216 public int remove(@Nullable Object element, int occurrences) {
217 if (element == null) {
220 return count(element);
223 E e = checkElement(element);
231 public boolean setCount(E element, int oldCount, int newCount) {
232 checkElement(element);
233 checkArgument(range.contains(element));
234 return mutate(element, new ConditionalSetCountModifier(oldCount, newCount))
239 public int setCount(E element, int count) {
240 checkElement(element);
241 checkArgument(range.contains(element));
242 return mutate(element, new SetCountModifier(count));
305 private final E element;
308 private LiveEntry(E element, int count) {
310 this.element = element;
316 return element;
326 return count = TreeMultiset.this.count(element);