121314151617181920212223
this.nodeSubQueue = nodeSubQueue; } public int size() { int size = 0; NodeSub node = nodeSubQueue.getTail().getPrevSub(); while (node != nodeSubQueue.getTail()) { node = node.getPrevSub(); size++; } return size; }
21222324252627282930313233
} return size; } public N getHead() { final NodeSub node = nodeSubQueue.getTail().getNextSub(); if (node == nodeSubQueue.getTail()) { current = null; return null; } current = node.getNextSub(); return (N) node; }
31323334353637383940414243
current = node.getNextSub(); return (N) node; } public N getNext() { final NodeSub node = current; if (node == nodeSubQueue.getTail()) { current = null; return null; } current = node.getNextSub(); return (N) node; }