Class StateMachineNodeExtensions
- Namespace
- LfrlAnvil.Computable.Automata.Extensions
- Assembly
- LfrlAnvil.Computable.Automata.dll
Contains IStateMachineNode<TState, TInput, TResult> extension methods.
public static class StateMachineNodeExtensions
- Inheritance
-
StateMachineNodeExtensions
- Inherited Members
Methods
CanTransition<TState, TInput, TResult>(IStateMachineNode<TState, TInput, TResult>)
Checks whether or not the provided node contains any transitions.
[Pure]
public static bool CanTransition<TState, TInput, TResult>(this IStateMachineNode<TState, TInput, TResult> node) where TState : notnull where TInput : notnull
Parameters
nodeIStateMachineNode<TState, TInput, TResult>Node to check.
Returns
- bool
true when
nodecontains at least one transition, otherwise false.
Type Parameters
TStateState type.
TInputInput type.
TResultResult type.
CanTransition<TState, TInput, TResult>(IStateMachineNode<TState, TInput, TResult>, TInput)
Checks whether or not the provided node contains transition with the provided identifier.
[Pure]
public static bool CanTransition<TState, TInput, TResult>(this IStateMachineNode<TState, TInput, TResult> node, TInput input) where TState : notnull where TInput : notnull
Parameters
nodeIStateMachineNode<TState, TInput, TResult>Node to check.
inputTInputTransition identifier to check.
Returns
- bool
true when
nodecontains the provided transition, otherwise false.
Type Parameters
TStateState type.
TInputInput type.
TResultResult type.
IsAccept<TState, TInput, TResult>(IStateMachineNode<TState, TInput, TResult>)
Checks whether or not the provided node is of Accept type.
[Pure]
public static bool IsAccept<TState, TInput, TResult>(this IStateMachineNode<TState, TInput, TResult> node) where TState : notnull where TInput : notnull
Parameters
nodeIStateMachineNode<TState, TInput, TResult>Node to check.
Returns
Type Parameters
TStateState type.
TInputInput type.
TResultResult type.
IsDead<TState, TInput, TResult>(IStateMachineNode<TState, TInput, TResult>)
Checks whether or not the provided node is of Dead type.
[Pure]
public static bool IsDead<TState, TInput, TResult>(this IStateMachineNode<TState, TInput, TResult> node) where TState : notnull where TInput : notnull
Parameters
nodeIStateMachineNode<TState, TInput, TResult>Node to check.
Returns
Type Parameters
TStateState type.
TInputInput type.
TResultResult type.
IsInitial<TState, TInput, TResult>(IStateMachineNode<TState, TInput, TResult>)
Checks whether or not the provided node is of Initial type.
[Pure]
public static bool IsInitial<TState, TInput, TResult>(this IStateMachineNode<TState, TInput, TResult> node) where TState : notnull where TInput : notnull
Parameters
nodeIStateMachineNode<TState, TInput, TResult>Node to check.
Returns
Type Parameters
TStateState type.
TInputInput type.
TResultResult type.