Class PatternDFA
- java.lang.Object
-
- org.apache.iotdb.commons.path.fa.dfa.PatternDFA
-
- All Implemented Interfaces:
IPatternFA
public class PatternDFA extends java.lang.Object implements IPatternFA
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.iotdb.commons.path.fa.IPatternFA
IPatternFA.Builder
-
-
Constructor Summary
Constructors Constructor Description PatternDFA(PartialPath pathPattern, boolean isPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<IFATransition>getFuzzyMatchTransitionIterator(IFAState state)intgetFuzzyMatchTransitionSize(IFAState state)IFAStategetInitialState()IFAStategetNextState(IFAState currentState, IFATransition transition)java.util.Map<java.lang.String,IFATransition>getPreciseMatchTransition(IFAState state)java.util.Iterator<IFATransition>getPreciseMatchTransitionIterator(IFAState state)IFAStategetState(int index)intgetStateSize()java.util.List<IFATransition>getTransition(IFAState state)booleanmayTransitionOverlap()Determines if there is overlap between the state transfer events of this FA.
-
-
-
Constructor Detail
-
PatternDFA
public PatternDFA(PartialPath pathPattern, boolean isPrefix)
-
-
Method Detail
-
getPreciseMatchTransition
public java.util.Map<java.lang.String,IFATransition> getPreciseMatchTransition(IFAState state)
- Specified by:
getPreciseMatchTransitionin interfaceIPatternFA- Parameters:
state- the source state of the returned transitions- Returns:
- transitions, that the given state has and only match one specified event rather than batch events
-
getPreciseMatchTransitionIterator
public java.util.Iterator<IFATransition> getPreciseMatchTransitionIterator(IFAState state)
- Specified by:
getPreciseMatchTransitionIteratorin interfaceIPatternFA- Parameters:
state- the source state of the returned transitions- Returns:
- transitions, that the given state has and only match one specified event rather than batch events
-
getFuzzyMatchTransitionIterator
public java.util.Iterator<IFATransition> getFuzzyMatchTransitionIterator(IFAState state)
- Specified by:
getFuzzyMatchTransitionIteratorin interfaceIPatternFA- Parameters:
state- state the source state of the returned transitions- Returns:
- transitions, that the given state has and can match batch events
-
getFuzzyMatchTransitionSize
public int getFuzzyMatchTransitionSize(IFAState state)
- Specified by:
getFuzzyMatchTransitionSizein interfaceIPatternFA- Parameters:
state- state the source state of the returned transitions- Returns:
- num of transitions, that the given state has and can match batch events
-
getNextState
public IFAState getNextState(IFAState currentState, IFATransition transition)
- Specified by:
getNextStatein interfaceIPatternFA- Parameters:
currentState- source statetransition- transition that the source state has- Returns:
- next state
-
getInitialState
public IFAState getInitialState()
- Specified by:
getInitialStatein interfaceIPatternFA- Returns:
- the initial state of this FA
-
getStateSize
public int getStateSize()
- Specified by:
getStateSizein interfaceIPatternFA- Returns:
- the size of states this FA has
-
getState
public IFAState getState(int index)
- Specified by:
getStatein interfaceIPatternFA- Parameters:
index- the index of the target state, used for uniquely identifying states in FA- Returns:
- the state identified by given index
-
mayTransitionOverlap
public boolean mayTransitionOverlap()
Description copied from interface:IPatternFADetermines if there is overlap between the state transfer events of this FA. If it returns true, then there may be overlap. If it returns false, there must be no overlap.- Specified by:
mayTransitionOverlapin interfaceIPatternFA- Returns:
- may transition overlap
-
getTransition
public java.util.List<IFATransition> getTransition(IFAState state)
-
-