public interface DfaAmbiguityResolver<MATCHRESULT>
extends java.io.Serializable, java.util.function.Function<java.util.Set<? extends MATCHRESULT>,MATCHRESULT>
DfaBuilder
.
When it's possible for a single string to match patterns that produce different results, the ambiguity resolver is called to determine what the result should be.
The implementation can throw a DfaAmbiguityException
in this case, or can combine the
multiple result objects into a single object if its type (e.g., EnumSet) permits.
This interface implements Serializable so that it can be written into the key signature for
BuilderCache
.