Interface StateFlowGraph

    • Method Detail

      • getById

        StateVertex getById​(int id)
        Parameters:
        id - The ID of the state
        Returns:
        The state if found or null.
      • getInitialState

        StateVertex getInitialState()
        Returns:
        The index state.
      • getOutgoingClickables

        com.google.common.collect.ImmutableSet<Eventable> getOutgoingClickables​(StateVertex stateVertex)
        Returns a set of all clickables outgoing from the specified vertex.
        Parameters:
        stateVertex - the state vertex.
        Returns:
        a set of the outgoing edges (clickables) of the stateVertex.
      • getIncomingClickable

        com.google.common.collect.ImmutableSet<Eventable> getIncomingClickable​(StateVertex stateVertex)
        Returns a set of all edges incoming into the specified vertex.
        Parameters:
        stateVertex - the state vertex.
        Returns:
        a set of the incoming edges (clickables) of the stateVertex.
      • canGoTo

        boolean canGoTo​(StateVertex source,
                        StateVertex target)
        Is it possible to go from s1 -> s2?
        Parameters:
        source - the source state.
        target - the target state.
        Returns:
        true if it is possible (edge exists in graph) to go from source to target.
      • getShortestPath

        com.google.common.collect.ImmutableList<Eventable> getShortestPath​(StateVertex start,
                                                                           StateVertex end)
        Convenience method to find the Dijkstra shortest path between two states on the graph.
        Parameters:
        start - the start state.
        end - the end state.
        Returns:
        a list of shortest path of clickables from the state to the end
      • getAllStates

        com.google.common.collect.ImmutableSet<StateVertex> getAllStates()
        Return all the states in the StateFlowGraph.
        Returns:
        all the states on the graph.
      • getAllEdges

        com.google.common.collect.ImmutableSet<Eventable> getAllEdges()
        Return all the edges in the StateFlowGraph.
        Returns:
        a Set of all edges in the StateFlowGraph
      • getMeanStateStringSize

        int getMeanStateStringSize()
        Returns:
        Dom string average size (byte).
      • getNumberOfStates

        int getNumberOfStates()
        Returns:
        The number of states, currently in the graph.
      • getAllPossiblePaths

        List<List<org.jgrapht.GraphPath<StateVertex,​Eventable>>> getAllPossiblePaths​(StateVertex index)
        This method returns all possible paths from the index state using the k-shortest paths.
        Parameters:
        index - the initial state.
        Returns:
        a list of GraphPath lists.
      • removeEdge

        boolean removeEdge​(Eventable event)
      • restoreEdge

        boolean restoreEdge​(Eventable event)
      • removeState

        boolean removeState​(StateVertex state)
      • restoreState

        boolean restoreState​(StateVertex state)