Package java.util

Examples of java.util.Queue.peek()


   
    List<PDGNode> processed = new ArrayList<PDGNode>();
    Queue nodes = new LinkedList();
    nodes.offer(this.m_startNode);
   
    while(nodes.peek() != null)
    {
      PDGNode node = (PDGNode) nodes.remove();
      processed.add(node);
     
      s += "\n Begin PDGNode: " + node;
View Full Code Here


        } catch (AsynchronousCommandException e) {
            LOG.log(Level.SEVERE, "Unable to access the cache to retrieve commands. ", e);
        }
        Object object = null;
        while (true) {
            object = queue.peek();
            if (object == null) {
                break;
            }
            String uid = (String) object;
            try {
View Full Code Here

   * in the queue.
   */
  public void dequeueIfNotDoneYet(Element elem, String name, Object object) {
    @SuppressWarnings("rawtypes")
    Queue queue = queue(elem, name, null);
    if (queue != null && object.equals(queue.peek())) {
      dequeueCurrentAndRunNext(elem, name);
    }
  }

  protected void replacequeue(Element elem, String name, Queue<?> queue) {
View Full Code Here

  private void stop(Element elem, String name, boolean clear, boolean jumpToEnd) {
    @SuppressWarnings("rawtypes")
    Queue q = queue(elem, name, null);
    if (q != null) {
      Object f = q.peek();
      if (clear) {
        q.clear();
      }
      if (f != null) {
        if (f instanceof Function) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.