findIndexesOf
public static org.apache.commons.lang3.tuple.Pair<java.lang.Integer,java.lang.Integer> findIndexesOf(RegexAutomaton automaton,
RegexAutomaton search)
throws it.unive.lisa.util.datastructures.automaton.CyclicAutomatonException
Yields the minimum and maximum indexes where search
first appears
in automaton
. If the second element of the returned pair is
null
, it means infinity, that is, there is at least a top
transition or a loop preceding one of the first matches.
Note that, if search
accepts the empty string, the returned pair
will be 0, automaton.maxLengthString()
, or 0, null
if
automaton
is not finite.
- Parameters:
automaton
- the automaton
search
- the automaton to search
- Returns:
- a pair of integers, representing the minimum and maximum indexes
where
search
first appears in automaton
, or
null
to represent infinity
- Throws:
it.unive.lisa.util.datastructures.automaton.CyclicAutomatonException
- if search
contains a loop