Package java.util

Examples of java.util.LinkedList.removeFirst()


        // prevents visiting the same state multiple times
        Set stateSet = new HashSet(step.getBeforeStatus().getStates());
        // breath-first search to-do list
        LinkedList todoList = new LinkedList(stateSet);
        while (!todoList.isEmpty()) {
            State st = (State) todoList.removeFirst();
            for (Iterator i = st.getTransitionsList().iterator();
                    i.hasNext();) {
                Transition t = (Transition) i.next();
                if (!transSet.contains(t)) {
                    transSet.add(t);
View Full Code Here


    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

        LinkedList process = new LinkedList();
        process.add(source);

        while (!process.isEmpty())
        {
            URL nextSource = (URL)process.removeFirst();
            URL nextTarget = (URL)result.get(nextSource);
            Map nextResults = findRelativeInOne(nextSource, nextTarget);
            for (Iterator i = nextResults.keySet().iterator(); i.hasNext(); )
            {
                URL newSource = (URL)i.next();
View Full Code Here

                throw new MissingDependencyException("Unable to download dependency "+artifact);
            }
            if(monitor != null) {
                monitor.setTotalBytes(-1); // Just to be sure
            }
            URL repository = (URL) list.removeFirst();
            URL url = artifact == null ? repository : getURL(artifact, repository);
            if (artifact != null)
                log.info("Attempting to download "+artifact+" from "+url);
            else
                log.info("Attempting to download "+url);
View Full Code Here

            queue.add( "" );
        }

        while ( !queue.isEmpty() )
        {
            String path = (String) queue.removeFirst();

            File currentDir = new File( dir, path );

            File[] files = currentDir.listFiles();
View Full Code Here

          }//inner switch
          break;
         
        case S_IN_FINISHED_VALUE:
          if(token.type==Yytoken.TYPE_EOF)
            return valueStack.removeFirst();
          else
            throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
         
        case S_IN_OBJECT:
          switch(token.type){
View Full Code Here

            }
            break;
          case Yytoken.TYPE_RIGHT_BRACE:
            if(valueStack.size()>1){
              statusStack.removeFirst();
              valueStack.removeFirst();
              status=peekStatus(statusStack);
            }
            else{
              status=S_IN_FINISHED_VALUE;
            }
View Full Code Here

          switch(token.type){
          case Yytoken.TYPE_COLON:
            break;
          case Yytoken.TYPE_VALUE:
            statusStack.removeFirst();
            String key=(String)valueStack.removeFirst();
            Map parent=(Map)valueStack.getFirst();
            parent.put(key,token.value);
            status=peekStatus(statusStack);
            break;
          case Yytoken.TYPE_LEFT_SQUARE:
View Full Code Here

            parent.put(key,token.value);
            status=peekStatus(statusStack);
            break;
          case Yytoken.TYPE_LEFT_SQUARE:
            statusStack.removeFirst();
            key=(String)valueStack.removeFirst();
            parent=(Map)valueStack.getFirst();
            List newArray=createArrayContainer(containerFactory);
            parent.put(key,newArray);
            status=S_IN_ARRAY;
            statusStack.addFirst(new Integer(status));
View Full Code Here

            statusStack.addFirst(new Integer(status));
            valueStack.addFirst(newArray);
            break;
          case Yytoken.TYPE_LEFT_BRACE:
            statusStack.removeFirst();
            key=(String)valueStack.removeFirst();
            parent=(Map)valueStack.getFirst();
            Map newObject=createObjectContainer(containerFactory);
            parent.put(key,newObject);
            status=S_IN_OBJECT;
            statusStack.addFirst(new Integer(status));
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.