
import sys
if sys.version_info >= (3, 8):
    from typing import Protocol
else:
    from typing_extensions import Protocol

import java.io
import java.lang
import java.net
import java.util
import java.util.regex
import jpype
import typing



class Automaton(java.io.Serializable, java.lang.Cloneable):
    MINIMIZE_HUFFMAN: typing.ClassVar[int] = ...
    MINIMIZE_BRZOZOWSKI: typing.ClassVar[int] = ...
    MINIMIZE_HOPCROFT: typing.ClassVar[int] = ...
    MINIMIZE_VALMARI: typing.ClassVar[int] = ...
    def __init__(self): ...
    def addEpsilons(self, collection: typing.Union[java.util.Collection['StatePair'], typing.Sequence['StatePair'], typing.Set['StatePair']]) -> None: ...
    def clone(self) -> 'Automaton': ...
    def complement(self) -> 'Automaton': ...
    def compress(self, string: typing.Union[java.lang.String, str], char: str) -> 'Automaton': ...
    @typing.overload
    def concatenate(self, automaton: 'Automaton') -> 'Automaton': ...
    @typing.overload
    @staticmethod
    def concatenate(list: java.util.List['Automaton']) -> 'Automaton': ...
    def determinize(self) -> None: ...
    def equals(self, object: typing.Any) -> bool: ...
    def expandSingleton(self) -> None: ...
    def getAcceptStates(self) -> java.util.Set['State']: ...
    def getCommonPrefix(self) -> java.lang.String: ...
    @typing.overload
    def getFiniteStrings(self) -> java.util.Set[java.lang.String]: ...
    @typing.overload
    def getFiniteStrings(self, int: int) -> java.util.Set[java.lang.String]: ...
    def getInfo(self) -> typing.Any: ...
    def getInitialState(self) -> 'State': ...
    def getLiveStates(self) -> java.util.Set['State']: ...
    def getNumberOfStates(self) -> int: ...
    def getNumberOfTransitions(self) -> int: ...
    def getShortestExample(self, boolean: bool) -> java.lang.String: ...
    def getSingleton(self) -> java.lang.String: ...
    def getStates(self) -> java.util.Set['State']: ...
    def getStrings(self, int: int) -> java.util.Set[java.lang.String]: ...
    def hashCode(self) -> int: ...
    @staticmethod
    def hexCases(automaton: 'Automaton') -> 'Automaton': ...
    def homomorph(self, charArray: typing.Union[typing.List[str], jpype.JArray], charArray2: typing.Union[typing.List[str], jpype.JArray]) -> 'Automaton': ...
    def intersection(self, automaton: 'Automaton') -> 'Automaton': ...
    def isDeterministic(self) -> bool: ...
    def isEmpty(self) -> bool: ...
    def isEmptyString(self) -> bool: ...
    def isFinite(self) -> bool: ...
    def isTotal(self) -> bool: ...
    @typing.overload
    @staticmethod
    def load(inputStream: java.io.InputStream) -> 'Automaton': ...
    @typing.overload
    @staticmethod
    def load(uRL: java.net.URL) -> 'Automaton': ...
    @staticmethod
    def makeAnyChar() -> 'Automaton': ...
    @staticmethod
    def makeAnyString() -> 'Automaton': ...
    @staticmethod
    def makeChar(char: str) -> 'Automaton': ...
    @staticmethod
    def makeCharRange(char: str, char2: str) -> 'Automaton': ...
    @staticmethod
    def makeCharSet(string: typing.Union[java.lang.String, str]) -> 'Automaton': ...
    @staticmethod
    def makeDecimalValue(string: typing.Union[java.lang.String, str]) -> 'Automaton': ...
    @staticmethod
    def makeEmpty() -> 'Automaton': ...
    @staticmethod
    def makeEmptyString() -> 'Automaton': ...
    @staticmethod
    def makeFractionDigits(int: int) -> 'Automaton': ...
    @staticmethod
    def makeIntegerValue(string: typing.Union[java.lang.String, str]) -> 'Automaton': ...
    @staticmethod
    def makeInterval(int: int, int2: int, int3: int) -> 'Automaton': ...
    @staticmethod
    def makeMaxInteger(string: typing.Union[java.lang.String, str]) -> 'Automaton': ...
    @staticmethod
    def makeMinInteger(string: typing.Union[java.lang.String, str]) -> 'Automaton': ...
    @staticmethod
    def makeString(string: typing.Union[java.lang.String, str]) -> 'Automaton': ...
    @staticmethod
    def makeStringMatcher(string: typing.Union[java.lang.String, str]) -> 'Automaton': ...
    @staticmethod
    def makeStringUnion(*charSequence: typing.Union[java.lang.CharSequence, str]) -> 'Automaton': ...
    @staticmethod
    def makeTotalDigits(int: int) -> 'Automaton': ...
    @typing.overload
    @staticmethod
    def minimize(automaton: 'Automaton') -> 'Automaton': ...
    @typing.overload
    def minimize(self) -> None: ...
    def minus(self, automaton: 'Automaton') -> 'Automaton': ...
    def optional(self) -> 'Automaton': ...
    def overlap(self, automaton: 'Automaton') -> 'Automaton': ...
    def prefixClose(self) -> None: ...
    def projectChars(self, set: java.util.Set[str]) -> 'Automaton': ...
    def reduce(self) -> None: ...
    def removeDeadTransitions(self) -> None: ...
    @typing.overload
    def repeat(self) -> 'Automaton': ...
    @typing.overload
    def repeat(self, int: int) -> 'Automaton': ...
    @typing.overload
    def repeat(self, int: int, int2: int) -> 'Automaton': ...
    @staticmethod
    def replaceWhitespace(automaton: 'Automaton') -> 'Automaton': ...
    def restoreInvariant(self) -> None: ...
    def run(self, string: typing.Union[java.lang.String, str]) -> bool: ...
    @staticmethod
    def setAllowMutate(boolean: bool) -> bool: ...
    def setDeterministic(self, boolean: bool) -> None: ...
    def setInfo(self, object: typing.Any) -> None: ...
    def setInitialState(self, state: 'State') -> None: ...
    @staticmethod
    def setMinimization(int: int) -> None: ...
    @staticmethod
    def setMinimizeAlways(boolean: bool) -> None: ...
    def shuffle(self, automaton: 'Automaton') -> 'Automaton': ...
    @staticmethod
    def shuffleSubsetOf(collection: typing.Union[java.util.Collection['Automaton'], typing.Sequence['Automaton'], typing.Set['Automaton']], automaton: 'Automaton', character: str, character2: str) -> java.lang.String: ...
    def singleChars(self) -> 'Automaton': ...
    def store(self, outputStream: java.io.OutputStream) -> None: ...
    def subsetOf(self, automaton: 'Automaton') -> bool: ...
    @typing.overload
    def subst(self, char: str, string: typing.Union[java.lang.String, str]) -> 'Automaton': ...
    @typing.overload
    def subst(self, map: typing.Union[java.util.Map[str, java.util.Set[str]], typing.Mapping[str, java.util.Set[str]]]) -> 'Automaton': ...
    def toDot(self) -> java.lang.String: ...
    def toString(self) -> java.lang.String: ...
    def trim(self, string: typing.Union[java.lang.String, str], char: str) -> 'Automaton': ...
    @typing.overload
    def union(self, automaton: 'Automaton') -> 'Automaton': ...
    @typing.overload
    @staticmethod
    def union(collection: typing.Union[java.util.Collection['Automaton'], typing.Sequence['Automaton'], typing.Set['Automaton']]) -> 'Automaton': ...

class AutomatonMatcher(java.util.regex.MatchResult):
    @typing.overload
    def end(self, string: typing.Union[java.lang.String, str]) -> int: ...
    @typing.overload
    def end(self) -> int: ...
    @typing.overload
    def end(self, int: int) -> int: ...
    def find(self) -> bool: ...
    @typing.overload
    def group(self, string: typing.Union[java.lang.String, str]) -> java.lang.String: ...
    @typing.overload
    def group(self) -> java.lang.String: ...
    @typing.overload
    def group(self, int: int) -> java.lang.String: ...
    def groupCount(self) -> int: ...
    @typing.overload
    def start(self, string: typing.Union[java.lang.String, str]) -> int: ...
    @typing.overload
    def start(self) -> int: ...
    @typing.overload
    def start(self, int: int) -> int: ...
    def toMatchResult(self) -> java.util.regex.MatchResult: ...

class AutomatonProvider:
    def getAutomaton(self, string: typing.Union[java.lang.String, str]) -> Automaton: ...

class BasicAutomata:
    @staticmethod
    def makeAnyChar() -> Automaton: ...
    @staticmethod
    def makeAnyString() -> Automaton: ...
    @staticmethod
    def makeChar(char: str) -> Automaton: ...
    @staticmethod
    def makeCharRange(char: str, char2: str) -> Automaton: ...
    @staticmethod
    def makeCharSet(string: typing.Union[java.lang.String, str]) -> Automaton: ...
    @staticmethod
    def makeDecimalValue(string: typing.Union[java.lang.String, str]) -> Automaton: ...
    @staticmethod
    def makeEmpty() -> Automaton: ...
    @staticmethod
    def makeEmptyString() -> Automaton: ...
    @staticmethod
    def makeFractionDigits(int: int) -> Automaton: ...
    @staticmethod
    def makeIntegerValue(string: typing.Union[java.lang.String, str]) -> Automaton: ...
    @staticmethod
    def makeInterval(int: int, int2: int, int3: int) -> Automaton: ...
    @staticmethod
    def makeMaxInteger(string: typing.Union[java.lang.String, str]) -> Automaton: ...
    @staticmethod
    def makeMinInteger(string: typing.Union[java.lang.String, str]) -> Automaton: ...
    @staticmethod
    def makeString(string: typing.Union[java.lang.String, str]) -> Automaton: ...
    @staticmethod
    def makeStringMatcher(string: typing.Union[java.lang.String, str]) -> Automaton: ...
    @staticmethod
    def makeStringUnion(*charSequence: typing.Union[java.lang.CharSequence, str]) -> Automaton: ...
    @staticmethod
    def makeTotalDigits(int: int) -> Automaton: ...

class BasicOperations:
    @staticmethod
    def addEpsilons(automaton: Automaton, collection: typing.Union[java.util.Collection['StatePair'], typing.Sequence['StatePair'], typing.Set['StatePair']]) -> None: ...
    @staticmethod
    def complement(automaton: Automaton) -> Automaton: ...
    @typing.overload
    @staticmethod
    def concatenate(automaton: Automaton, automaton2: Automaton) -> Automaton: ...
    @typing.overload
    @staticmethod
    def concatenate(list: java.util.List[Automaton]) -> Automaton: ...
    @staticmethod
    def determinize(automaton: Automaton) -> None: ...
    @staticmethod
    def getShortestExample(automaton: Automaton, boolean: bool) -> java.lang.String: ...
    @staticmethod
    def intersection(automaton: Automaton, automaton2: Automaton) -> Automaton: ...
    @staticmethod
    def isEmpty(automaton: Automaton) -> bool: ...
    @staticmethod
    def isEmptyString(automaton: Automaton) -> bool: ...
    @staticmethod
    def isTotal(automaton: Automaton) -> bool: ...
    @staticmethod
    def minus(automaton: Automaton, automaton2: Automaton) -> Automaton: ...
    @staticmethod
    def optional(automaton: Automaton) -> Automaton: ...
    @typing.overload
    @staticmethod
    def repeat(automaton: Automaton) -> Automaton: ...
    @typing.overload
    @staticmethod
    def repeat(automaton: Automaton, int: int) -> Automaton: ...
    @typing.overload
    @staticmethod
    def repeat(automaton: Automaton, int: int, int2: int) -> Automaton: ...
    @staticmethod
    def run(automaton: Automaton, string: typing.Union[java.lang.String, str]) -> bool: ...
    @staticmethod
    def subsetOf(automaton: Automaton, automaton2: Automaton) -> bool: ...
    @typing.overload
    @staticmethod
    def union(automaton: Automaton, automaton2: Automaton) -> Automaton: ...
    @typing.overload
    @staticmethod
    def union(collection: typing.Union[java.util.Collection[Automaton], typing.Sequence[Automaton], typing.Set[Automaton]]) -> Automaton: ...

class Datatypes:
    @staticmethod
    def exists(string: typing.Union[java.lang.String, str]) -> bool: ...
    @staticmethod
    def get(string: typing.Union[java.lang.String, str]) -> Automaton: ...
    @staticmethod
    def isUnicodeBlockName(string: typing.Union[java.lang.String, str]) -> bool: ...
    @staticmethod
    def isUnicodeCategoryName(string: typing.Union[java.lang.String, str]) -> bool: ...
    @staticmethod
    def isXMLName(string: typing.Union[java.lang.String, str]) -> bool: ...
    @staticmethod
    def main(stringArray: typing.Union[typing.List[java.lang.String], jpype.JArray]) -> None: ...

class MinimizationOperations:
    @staticmethod
    def minimize(automaton: Automaton) -> None: ...
    @staticmethod
    def minimizeBrzozowski(automaton: Automaton) -> None: ...
    @staticmethod
    def minimizeHopcroft(automaton: Automaton) -> None: ...
    @staticmethod
    def minimizeHuffman(automaton: Automaton) -> None: ...
    @staticmethod
    def minimizeValmari(automaton: Automaton) -> None: ...

class RegExp:
    INTERSECTION: typing.ClassVar[int] = ...
    COMPLEMENT: typing.ClassVar[int] = ...
    EMPTY: typing.ClassVar[int] = ...
    ANYSTRING: typing.ClassVar[int] = ...
    AUTOMATON: typing.ClassVar[int] = ...
    INTERVAL: typing.ClassVar[int] = ...
    ALL: typing.ClassVar[int] = ...
    NONE: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self, string: typing.Union[java.lang.String, str]): ...
    @typing.overload
    def __init__(self, string: typing.Union[java.lang.String, str], int: int): ...
    def getIdentifiers(self) -> java.util.Set[java.lang.String]: ...
    def setAllowMutate(self, boolean: bool) -> bool: ...
    @typing.overload
    def toAutomaton(self) -> Automaton: ...
    @typing.overload
    def toAutomaton(self, boolean: bool) -> Automaton: ...
    @typing.overload
    def toAutomaton(self, automatonProvider: typing.Union[AutomatonProvider, typing.Callable]) -> Automaton: ...
    @typing.overload
    def toAutomaton(self, automatonProvider: typing.Union[AutomatonProvider, typing.Callable], boolean: bool) -> Automaton: ...
    @typing.overload
    def toAutomaton(self, map: typing.Union[java.util.Map[typing.Union[java.lang.String, str], Automaton], typing.Mapping[typing.Union[java.lang.String, str], Automaton]]) -> Automaton: ...
    @typing.overload
    def toAutomaton(self, map: typing.Union[java.util.Map[typing.Union[java.lang.String, str], Automaton], typing.Mapping[typing.Union[java.lang.String, str], Automaton]], boolean: bool) -> Automaton: ...
    def toString(self) -> java.lang.String: ...

class RunAutomaton(java.io.Serializable):
    @typing.overload
    def __init__(self, automaton: Automaton): ...
    @typing.overload
    def __init__(self, automaton: Automaton, boolean: bool): ...
    def getCharIntervals(self) -> typing.MutableSequence[str]: ...
    def getInitialState(self) -> int: ...
    def getSize(self) -> int: ...
    def isAccept(self, int: int) -> bool: ...
    @typing.overload
    @staticmethod
    def load(inputStream: java.io.InputStream) -> 'RunAutomaton': ...
    @typing.overload
    @staticmethod
    def load(uRL: java.net.URL) -> 'RunAutomaton': ...
    @typing.overload
    def newMatcher(self, charSequence: typing.Union[java.lang.CharSequence, str]) -> AutomatonMatcher: ...
    @typing.overload
    def newMatcher(self, charSequence: typing.Union[java.lang.CharSequence, str], int: int, int2: int) -> AutomatonMatcher: ...
    @typing.overload
    def run(self, string: typing.Union[java.lang.String, str]) -> bool: ...
    @typing.overload
    def run(self, string: typing.Union[java.lang.String, str], int: int) -> int: ...
    def step(self, int: int, char: str) -> int: ...
    def store(self, outputStream: java.io.OutputStream) -> None: ...
    def toString(self) -> java.lang.String: ...

class ShuffleOperations:
    @staticmethod
    def shuffle(automaton: Automaton, automaton2: Automaton) -> Automaton: ...
    @staticmethod
    def shuffleSubsetOf(collection: typing.Union[java.util.Collection[Automaton], typing.Sequence[Automaton], typing.Set[Automaton]], automaton: Automaton, character: str, character2: str) -> java.lang.String: ...

class SpecialOperations:
    @staticmethod
    def compress(automaton: Automaton, string: typing.Union[java.lang.String, str], char: str) -> Automaton: ...
    @staticmethod
    def getCommonPrefix(automaton: Automaton) -> java.lang.String: ...
    @typing.overload
    @staticmethod
    def getFiniteStrings(automaton: Automaton) -> java.util.Set[java.lang.String]: ...
    @typing.overload
    @staticmethod
    def getFiniteStrings(automaton: Automaton, int: int) -> java.util.Set[java.lang.String]: ...
    @staticmethod
    def getStrings(automaton: Automaton, int: int) -> java.util.Set[java.lang.String]: ...
    @staticmethod
    def hexCases(automaton: Automaton) -> Automaton: ...
    @staticmethod
    def homomorph(automaton: Automaton, charArray: typing.Union[typing.List[str], jpype.JArray], charArray2: typing.Union[typing.List[str], jpype.JArray]) -> Automaton: ...
    @staticmethod
    def isFinite(automaton: Automaton) -> bool: ...
    @staticmethod
    def overlap(automaton: Automaton, automaton2: Automaton) -> Automaton: ...
    @staticmethod
    def prefixClose(automaton: Automaton) -> None: ...
    @staticmethod
    def projectChars(automaton: Automaton, set: java.util.Set[str]) -> Automaton: ...
    @staticmethod
    def replaceWhitespace(automaton: Automaton) -> Automaton: ...
    @staticmethod
    def reverse(automaton: Automaton) -> java.util.Set['State']: ...
    @staticmethod
    def singleChars(automaton: Automaton) -> Automaton: ...
    @typing.overload
    @staticmethod
    def subst(automaton: Automaton, char: str, string: typing.Union[java.lang.String, str]) -> Automaton: ...
    @typing.overload
    @staticmethod
    def subst(automaton: Automaton, map: typing.Union[java.util.Map[str, java.util.Set[str]], typing.Mapping[str, java.util.Set[str]]]) -> Automaton: ...
    @staticmethod
    def trim(automaton: Automaton, string: typing.Union[java.lang.String, str], char: str) -> Automaton: ...

class State(java.io.Serializable, java.lang.Comparable['State']):
    def __init__(self): ...
    def addTransition(self, transition: 'Transition') -> None: ...
    def compareTo(self, state: 'State') -> int: ...
    def equals(self, object: typing.Any) -> bool: ...
    def getSortedTransitions(self, boolean: bool) -> java.util.List['Transition']: ...
    def getTransitions(self) -> java.util.Set['Transition']: ...
    def hashCode(self) -> int: ...
    def isAccept(self) -> bool: ...
    def setAccept(self, boolean: bool) -> None: ...
    @typing.overload
    def step(self, char: str) -> 'State': ...
    @typing.overload
    def step(self, char: str, collection: typing.Union[java.util.Collection['State'], typing.Sequence['State'], typing.Set['State']]) -> None: ...
    def toString(self) -> java.lang.String: ...

class StatePair:
    def __init__(self, state: State, state2: State): ...
    def equals(self, object: typing.Any) -> bool: ...
    def getFirstState(self) -> State: ...
    def getSecondState(self) -> State: ...
    def hashCode(self) -> int: ...

class StringUnionOperations:
    LEXICOGRAPHIC_ORDER: typing.ClassVar[java.util.Comparator] = ...
    def __init__(self): ...
    def add(self, charSequence: typing.Union[java.lang.CharSequence, str]) -> None: ...
    @staticmethod
    def build(charSequenceArray: typing.Union[typing.List[java.lang.CharSequence], jpype.JArray]) -> State: ...
    def complete(self) -> 'StringUnionOperations.State': ...
    class State: ...

class Transition(java.io.Serializable, java.lang.Cloneable):
    @typing.overload
    def __init__(self, char: str, char2: str, state: State): ...
    @typing.overload
    def __init__(self, char: str, state: State): ...
    def clone(self) -> 'Transition': ...
    def equals(self, object: typing.Any) -> bool: ...
    def getDest(self) -> State: ...
    def getMax(self) -> str: ...
    def getMin(self) -> str: ...
    def hashCode(self) -> int: ...
    def toString(self) -> java.lang.String: ...

class DatatypesAutomatonProvider(AutomatonProvider):
    @typing.overload
    def __init__(self): ...
    @typing.overload
    def __init__(self, boolean: bool, boolean2: bool, boolean3: bool): ...
    def getAutomaton(self, string: typing.Union[java.lang.String, str]) -> Automaton: ...


class __module_protocol__(Protocol):
    # A module protocol which reflects the result of ``jp.JPackage("dk.brics.automaton")``.

    Automaton: typing.Type[Automaton]
    AutomatonMatcher: typing.Type[AutomatonMatcher]
    AutomatonProvider: typing.Type[AutomatonProvider]
    BasicAutomata: typing.Type[BasicAutomata]
    BasicOperations: typing.Type[BasicOperations]
    Datatypes: typing.Type[Datatypes]
    DatatypesAutomatonProvider: typing.Type[DatatypesAutomatonProvider]
    MinimizationOperations: typing.Type[MinimizationOperations]
    RegExp: typing.Type[RegExp]
    RunAutomaton: typing.Type[RunAutomaton]
    ShuffleOperations: typing.Type[ShuffleOperations]
    SpecialOperations: typing.Type[SpecialOperations]
    State: typing.Type[State]
    StatePair: typing.Type[StatePair]
    StringUnionOperations: typing.Type[StringUnionOperations]
    Transition: typing.Type[Transition]
