/** * Retrieves and removes the head of the queue represented by this deque. * * This method differs from {@link #poll poll} only in that it throws an * exception if this deque is empty. * * <p> * This method is equivalent to {@link #removeFirst}. * * @return the head of the queue represented by this deque * @throws NoSuchElementException * {@inheritDoc} */ public E remove() { return removeFirst(); }
/** * Pops an element from the stack represented by this deque. In other words, * removes and returns the first element of this deque. * * <p> * This method is equivalent to {@link #removeFirst()}. * * @return the element at the front of this deque (which is the top of the * stack represented by this deque) * @throws NoSuchElementException * {@inheritDoc} */ public E pop() { return removeFirst(); }
public TreeEvent next() throws XerialException { if (hasNext()) { TreeEvent e = prefetchedEventQueue.removeFirst(); return e; } else return null; }
public TreeEvent next() throws XerialException { if (hasNext()) { TreeEvent e = prefetchedEventQueue.removeFirst(); return e; } else return null; }
private void flushPendingEvent() { while (!pendingEventQueue.isEmpty()) eventQueue.push(pendingEventQueue.removeFirst()); }
private void flushPendingEvent() { while (!pendingEventQueue.isEmpty()) eventQueue.push(pendingEventQueue.removeFirst()); }
public SilkEvent next() throws XerialException { if (!prefetchedEventQueue.isEmpty()) return prefetchedEventQueue.removeFirst(); if (foundEOF) return eventQueue.poll(); fetchNext(); return next(); }
public SilkEvent next() throws XerialException { if (!prefetchedEventQueue.isEmpty()) return prefetchedEventQueue.removeFirst(); if (foundEOF) return eventQueue.poll(); fetchNext(); return next(); }
public void consumeEvent() throws Exception { while ((eventQueue = getNext()) != null) { while (!eventQueue.isEmpty()) { SilkEvent e = null; try { e = eventQueue.getFirst(); } finally { if (e != null) { eventQueue.removeFirst(); handler.handle(e); eventCount++; } } } } }
private void flushPendingEvent(TreeEventHandler handler) throws Exception { while (!pendingEventQueue.isEmpty()) { TreeEvent e = pendingEventQueue.removeFirst(); switch (e.event) { case VISIT: handler.visitNode(e.nodeName, e.nodeValue); break; case LEAVE: handler.leaveNode(e.nodeName); break; case TEXT: handler.text(e.nodeName, e.nodeValue); break; } } }
private void flushPendingEvent(TreeEventHandler handler) throws Exception { while (!pendingEventQueue.isEmpty()) { TreeEvent e = pendingEventQueue.removeFirst(); switch (e.event) { case VISIT: handler.visitNode(e.nodeName, e.nodeValue); break; case LEAVE: handler.leaveNode(e.nodeName); break; case TEXT: handler.text(e.nodeName, e.nodeValue); break; } } }
public void consumeEvent() throws Exception { while ((eventQueue = getNext()) != null) { while (!eventQueue.isEmpty()) { SilkEvent e = null; try { e = eventQueue.getFirst(); } finally { if (e != null) { eventQueue.removeFirst(); handler.handle(e); eventCount++; } } } } }