getCommonPrefix

Returns the longest string that is a prefix of all accepted strings and visits each state at most once. The automaton must not have dead states. If this automaton has already been converted to UTF-8 (e.g. using UTF32ToUTF8) then you should use .getCommonPrefixBytesRef instead.

Return

common prefix, which can be an empty (length 0) String (never null)

Throws

if the automaton has dead states reachable from the initial state.