List all values, perhaps with repetitions.
List all values, perhaps with repetitions. It is not guaranteed that the values will be repeated the correct number of times.
An iterator of values.
List all values, with repetitions, excluding values from a given sequence (which can also contain repeated values).
List all values, with repetitions, excluding values from a given sequence (which can also contain repeated values). It is guaranteed that the values will be repeated the correct number of times.
A sequence of values that should be skipped while running the iterator.
An iterator of values.
Remove value from the bag.
Remove value from the bag. This is expected to succeed. If the value was not present in the bag, the removal fails.
Value to remove.
true
if removal was successful, false
otherwise.
This method is very slow due to _O_(_n_) queue traversal.
This method is very slow due to _O_(_n_) queue traversal. Do not use in performance-critical places.
Total number of elements in the bag.
Implementation using
java.util.concurrent.ConcurrentLinkedQueue
.This is suitable for molecule value types that have a large number of possible values (so that a
Map
storage would be inefficient), or for cases where we do not need to group molecules by value (pipelined molecules).