public List < State > getPrefixStates ( Path path ) { List < State > result = new LinkedList <> ( ) ; for ( State state : stateMap . values ( ) ) { if ( state . getPath ( ) . isPrefixOf ( path ) ) { result . add ( state ) ; } } return result ; }
Get all States that have Paths which are prefixes of the given Path .