All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.plantuml.quantization.Multiset Maven / Gradle / Ivy

There is a newer version: 1.2024.8
Show newest version
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.quantization;

import java.util.Collection;
import java.util.Set;

/**
 * A collection which permits duplicates, and provides methods adding/removing
 * several counts of an element.
 *
 * @param  the element type
 */
public interface Multiset extends Collection {
	/**
	 * Add n counts of an element.
	 *
	 * @param element the element to add
	 * @param n       how many to add
	 */
	public void add(E element, int n);

	/**
	 * Remove up to n counts of an element.
	 *
	 * @param element the element the remove
	 * @param n       how many to remove
	 * @return the number of elements removed
	 */
	public int remove(Object element, int n);

	public int count(Object element);

	public Set getDistinctElements();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy