getAlts static method

BitSet getAlts(
  1. List<BitSet> altsets
)

Gets the complete set of represented alternatives for a collection of alternative subsets. This method returns the union of each BitSet in altsets.

@param altsets a collection of alternative subsets @return the set of represented alternatives in altsets

Implementation

static BitSet getAlts(List<BitSet> altsets) {
  final all = BitSet();
  for (var alts in altsets) {
    all.or(alts);
  }
  return all;
}