public void push(SilkFunctionPlugin plugin) { eventQueue.addLast(plugin); }
public void push(TreeEvent e) { eventQueue.addLast(e); }
/** * Inserts the specified element at the end of this deque. * * @param e * the element to add * @return <tt>true</tt> (as specified by {@link Deque#offerLast}) * @throws NullPointerException * if the specified element is null */ public boolean offerLast(E e) { addLast(e); return true; }
public void push(TreeEvent e) { eventQueue.addLast(e); }
public void push(SilkFunctionPlugin plugin) { eventQueue.addLast(plugin); }
private void pushParseState(ParseState ps) { parseStateStack.addLast(ps); // _logger.trace("push: " + StringUtil.join(parseStateStack, ", ")); }
private void pushParseState(ParseState ps) { parseStateStack.addLast(ps); // _logger.trace("push: " + StringUtil.join(parseStateStack, ", ")); }
/** * Inserts the specified element at the end of this deque. * * <p> * This method is equivalent to {@link #addLast}. * * @param e * the element to add * @return <tt>true</tt> (as specified by {@link Collection#add}) * @throws NullPointerException * if the specified element is null */ @Override public boolean add(E e) { addLast(e); return true; }
private void fetchNext() throws XerialException { try { SilkEvent e = null; while (!foundEOF && (e = eventQueue.poll(1, TimeUnit.MILLISECONDS)) == null) {} if (e != null) prefetchedEventQueue.addLast(e); } catch (InterruptedException e) { foundEOF = true; } return; }
private void fetchNext() throws XerialException { try { SilkEvent e = null; while (!foundEOF && (e = eventQueue.poll(1, TimeUnit.MILLISECONDS)) == null) {} if (e != null) prefetchedEventQueue.addLast(e); } catch (InterruptedException e) { foundEOF = true; } return; }
private void init() { parseStateStack.clear(); keyStack.clear(); lastReportedEvent = null; currentDepth = 0; parseStateStack.addLast(ParseState.Root); }
@Override public boolean hasNext() { if (!queue.isEmpty()) return true; try { String line = readLine(); if (line != null) { queue.addLast(line); return true; } } catch (IOException e) { // An error occurred while reading } return false; }
private void reset(CharStream newStream) { _lexer.reset(); _lexer.setCharStream(newStream); parseStateStack.clear(); keyStack.clear(); lastReportedEvent = null; currentDepth = 0; parseStateStack.addLast(ParseState.Root); }
/** * Is next event available? * * @return true if there are remaining events, otherwise fales * @throws XerialException */ private boolean hasNext() throws XerialException { if (!prefetchedEventQueue.isEmpty()) return true; if (hasPrefetchFinished) return false; if (hasParsingFinished) { int count = eventQueue.drainTo(prefetchedEventQueue); hasPrefetchFinished = true; return hasNext(); } try { TreeEvent e = null; while (!hasParsingFinished && (e = eventQueue.poll(1, TimeUnit.SECONDS)) == null) {} if (e != null) { prefetchedEventQueue.addLast(e); return true; } return hasNext(); } catch (InterruptedException e) { } return false; }
/** * Is next event available? * * @return true if there are remaining events, otherwise fales * @throws XerialException */ private boolean hasNext() throws XerialException { if (!prefetchedEventQueue.isEmpty()) return true; if (hasPrefetchFinished) return false; if (hasParsingFinished) { int count = eventQueue.drainTo(prefetchedEventQueue); hasPrefetchFinished = true; return hasNext(); } try { TreeEvent e = null; while (!hasParsingFinished && (e = eventQueue.poll(1, TimeUnit.SECONDS)) == null) {} if (e != null) { prefetchedEventQueue.addLast(e); return true; } return hasNext(); } catch (InterruptedException e) { } return false; }
keyStack.addLast(unescapeString(token.getText())); continue;