Class NFAStateNameHandler
- java.lang.Object
-
- org.apache.flink.cep.nfa.compiler.NFAStateNameHandler
-
-
Field Summary
Fields Modifier and Type Field Description static StringSTATE_NAME_DELIM
-
Constructor Summary
Constructors Constructor Description NFAStateNameHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckNameUniqueness(String name)Checks if the given name is already used or not.voidclear()Clear the names added during checking name uniqueness.static StringgetOriginalNameFromInternal(String internalName)Implements the reverse process of thegetUniqueInternalName(String).StringgetUniqueInternalName(String baseName)Used to give a unique name toNFAstates created during the translation process.
-
-
-
Field Detail
-
STATE_NAME_DELIM
public static final String STATE_NAME_DELIM
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOriginalNameFromInternal
public static String getOriginalNameFromInternal(String internalName)
Implements the reverse process of thegetUniqueInternalName(String).- Parameters:
internalName- The name to be decoded.- Returns:
- The original, user-specified name for the state.
-
checkNameUniqueness
public void checkNameUniqueness(String name)
Checks if the given name is already used or not. If yes, it throws aMalformedPatternException.- Parameters:
name- The name to be checked.
-
clear
public void clear()
Clear the names added during checking name uniqueness.
-
getUniqueInternalName
public String getUniqueInternalName(String baseName)
Used to give a unique name toNFAstates created during the translation process. The name format will bebaseName:counter, where the counter is increasing for states with the samebaseName.- Parameters:
baseName- The base of the name.- Returns:
- The (unique) name that is going to be used internally for the state.
-
-