Code example for LinkedList

Methods: isEmpty, poll

0
    public void setNodes(LinkedList<Node> nodes) {
		this.nodes = nodes;
    } 
 
    public Node pollNode() { 
        return nodes.isEmpty() ? null : nodes.poll();
    } 
     
    public boolean hasNodes() { 
        return !nodes.isEmpty();
    } 
     
    public boolean hasBlock() { 
        return block != null;
    } 
 
    public Node getBlock() { 
        return block;
    } 
 
    public void setBlock(Node block) {