};
Iterator<PostingNode> itr = segment.iterator();
PostingNode firstNode = itr.next();
PostingNode secondNode = itr.next();
AdjacencyRec firstAdj = new AdjacencyRec(firstNode, secondNode);
queue.insertAndGrow(firstAdj);
AdjacencyRec prevAdj = firstAdj;
while(itr.hasNext()) {
PostingNode curNode = itr.next();
AdjacencyRec adj = new AdjacencyRec(curNode, prevAdj);
queue.insertAndGrow(adj);