Code example for LinkedBlockingDeque

 * @author kaizawa 
class BreadthFirstSearch extends SearchAlgorithm { 
    LinkedBlockingDeque<LinkedList> foundNodeQueue = new LinkedBlockingDeque<>();
    Set<Node> foundNodeSet = new HashSet<>(); // Found, but has not children search 
    List<Node> shortestPath = Collections.emptyList();
    public BreadthFirstSearch(List<Node> nodeList, Node startNode, Node goalNode) {
        super(nodeList, startNode, goalNode);
    public SearchResult doSearch() { 
        // List of Node which represents path. 
        LinkedList<Node> currentPath = new LinkedList<>();
Stop searching for code, let great code find you!  Add Codota to your java IDE