+ * TODO: Rename to ImmutableAutomaton.
**/
public abstract class AbstractMemoizingAutomaton All methods throw an {@link IllegalArgumentException} on a best-effort basis if they detect
* that a state given as an argument is not reachable from the initial states. Note that this
- * behavior cannot be guaranteed, as it is, generally speaking, expensive to check this
- * for on-the-fly constructed automata. Therefore, it would be wrong to write a program that
- * depends on this exception for its correctness: this should be only used to detect bugs.
implements Automaton {
@@ -192,6 +195,11 @@ public final Set
If you want to check if this is the unique edge use the {@link #edges(Object, BitSet)} * method.
* - * @param state - * The starting state of the transition. - * @param valuation - * The valuation. - * + * @param state The starting state of the transition. + * @param valuation The valuation. * @return A successor edge or {@code null} if none. - * * @see #edgeMap(Object) */ @Nullable @@ -156,9 +151,7 @@ default EdgeIf you want to check if this is the unique edge use the successors() method.
* - * @param state - * The starting state of the transition. - * @param valuation - * The valuation. - * + * @param state The starting state of the transition. + * @param valuation The valuation. * @return A successor or {@code null} if none. */ @Nullable @@ -221,12 +208,14 @@ default S successor(S state, BitSet valuation) { return Iterables.getFirst(successors(state, valuation), null); } + default S successor(S state, ImmutableBitSet valuation) { + return Iterables.getFirst(successors(state, valuation), null); + } + /** * Returns all successors of the specified {@code state}. * - * @param state - * The starting state of the transition. - * + * @param state The starting state of the transition. * @return The successor set. */ default Set