Package java.util

Examples of java.util.LinkedList.removeFirst()


    throws ModelException {
        LinkedList wrkSet = new LinkedList(states);
        // clear the seed-set - will be populated by leaf states
        states.clear();
        while (!wrkSet.isEmpty()) {
            TransitionTarget tt = (TransitionTarget) wrkSet.removeFirst();
            if (tt instanceof State) {
                State st = (State) tt;
                //state can either have parallel or substates w. initial
                //or it is a leaf state
                // NOTE: Digester has to verify this precondition!
View Full Code Here


    // at most one at a time before checking for reapable children.
    VMProcess process = null;
    synchronized (workList)
      {
        if (!workList.isEmpty())
    process = (VMProcess)workList.removeFirst();
      }

    if (process != null)
      spawn(process);
View Full Code Here

    private JExpression createThisRef(JReferenceType qualType,
        List/* <JExpression> */list) {
      LinkedList/* <JExpression> */workList = new LinkedList/* <JExpression> */();
      workList.addAll(list);
      while (!workList.isEmpty()) {
        JExpression expr = (JExpression) workList.removeFirst();
        JClassType classType = (JClassType) expr.getType();
        for (; classType != null; classType = classType.extnds) {
          // prefer myself or myself-as-supertype over any of my this$ fields
          // that may have already been added to the work list
          if (program.typeOracle.canTriviallyCast(classType, qualType)) {
View Full Code Here

         || (stack.isEmpty())
         || (stack.getFirst()!=this)
       ) {
      log.warn("can't pop current session: are you calling JbpmSession.close() multiple times ?");
    } else {
      stack.removeFirst();
    }
  }

  private static final Log log = LogFactory.getLog(JbpmSession.class);
}
View Full Code Here

            task.state = ClassLoadingTask.WAIT_ON_EVENT;
         }
         return;
      }

      ThreadTask threadTask = (ThreadTask) taskList.removeFirst();
      ClassLoadingTask loadTask = threadTask.getLoadTask();

      if( trace )
         log.trace("Begin nextTask("+taskList.size()+"), LoadTask="+loadTask);
      try
View Full Code Here

      int size = taskList != null ? taskList.size() : 0;
      synchronized( taskList )
      {
         for(int i = 0; i < size; i ++)
         {
            ThreadTask threadTask = (ThreadTask) taskList.removeFirst();
            ClassLoadingTask loadTask = threadTask.getLoadTask();
            // Insert the task into the requestingThread task list
            if( trace )
               log.trace("Reassigning task: "+threadTask+", to: "+loadTask.requestingThread);
            threadTask.t = null;
View Full Code Here

        out.flush();
        needToFlush = false;
          }
          ((IOFuture) next).done();
      }
      localQueue.removeFirst();
        }
        if (needToFlush) {
      out.flush();
        }
    }
View Full Code Here

      buf.putInt(ngroups);
      while (!groups.isEmpty()) {
    if (((byte[]) groups.getFirst()).length > buf.remaining()) {
        break;
    }
    buf.put((byte[]) groups.removeFirst());
    ngroups++;
      }
      if (ngroups > 0) {
    buf.putInt(ngroupsPos, ngroups);
      }
View Full Code Here

      buf.putInt(ngroups);
      while (!groups.isEmpty()) {
    if (((byte[]) groups.getFirst()).length > buf.remaining()) {
        break;
    }
    buf.put((byte[]) groups.removeFirst());
    ngroups++;
      }
      if (ngroups > 0) {
    buf.putInt(ngroupsPos, ngroups);
      }
View Full Code Here

    private synchronized ComponentNameSpace getLoadBalancedComponentName(ComponentNameSpace cns){
        ComponentNameSpace result = null;
        String key = cns.getName();
        LinkedList list = (LinkedList)loadBalancedComponentMap.get(key);
        if (list != null && !list.isEmpty()){
            result = (ComponentNameSpace) list.removeFirst();
            list.addLast(result);
        }
        return result;
    }
}
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.