public static boolean isTerminal(ArrayList<Configuration> beam)
    {
        for (Configuration configuration : beam)
            if (!configuration.state.isTerminalState())
                return false;
        return true;
    }
public static boolean isTerminal ( ArrayList < Configuration > beam ) { for ( Configuration configuration : beam ) if ( ! configuration . state . isTerminalState ( ) ) return false ; return true ; }
Shows true if all of the configurations in the beam are in the terminal state

@param beam the current beam
@return true if all of the configurations in the beam are in the terminal state