コード例 #1
0
 /**
  * Pops the output list currently at the top of the output list stack and appends it to the end of
  * the output list immediately underneath.
  *
  * @throws EmptyStackException if there is currently only one output list on the stack.
  * @see #mergeOutputList(List)
  */
 public synchronized void mergeOutputList() {
   logger.debug3("Merging");
   List oldTop = (List) listStack.pop();
   List newTop = (List) listStack.peek();
   newTop.addAll(oldTop);
 }
コード例 #2
0
 /**
  * Pops the output list currently at the top of the output list stack and discards it, and appends
  * the given replacement list to the output list immediately underneath.
  *
  * @param replacement A list of tokens to be appended to the output list currently immediately
  *     under the top of the stack.
  * @throws EmptyStackException if there is currently only one output list on the stack.
  */
 public synchronized void mergeOutputList(List replacement) {
   logger.debug3("Merging with replacement");
   listStack.pop(); // discard result
   List newTop = (List) listStack.peek();
   newTop.addAll(replacement);
 }
コード例 #3
0
 /**
  * Gets the output list currently at the top of the output list stack.
  *
  * @return The list of tokens currently at the top of the list stack.
  * @see #splitOutputList
  * @see #mergeOutputList()
  * @see #mergeOutputList(List)
  */
 public synchronized List getOutputList() {
   return (List) listStack.peek();
 }