public NodeT getNext() {
        String nextItemKey = queue.poll();
        if (nextItemKey == null) {
            return null;
        }
        return nodeTable.get(nextItemKey);
    }
public NodeT getNext ( ) { String nextItemKey = queue . poll ( ) ; if ( nextItemKey == null ) { return null ; } return nodeTable . get ( nextItemKey ) ; }
Gets next node in the DAG which has no dependency or all of it's dependencies are resolved and
ready to be consumed.

@return next node or null if all the nodes have been explored or no node is available at this moment.