public static int getSingleViableAlt(Collection<BitSet> altsets) {
		BitSet viableAlts = new BitSet();
		for (BitSet alts : altsets) {
			int minAlt = alts.nextSetBit(0);
			viableAlts.set(minAlt);
			if ( viableAlts.cardinality()>1 ) { // more than 1 viable alt
				return ATN.INVALID_ALT_NUMBER;
			}
		}
		return viableAlts.nextSetBit(0);
	}
Get a map from state to alt subset from a configuration set. For each
configuration {@code c} in {@code configs}:

<pre>
map[c.{@link ATNConfig#state state}] U= c.{@link ATNConfig#alt alt}
</pre>
runtime/Java/src/org/antlr/v4/runtime/atn/PredictionMode.java