Package java.util

Examples of java.util.LinkedList.removeFirst()


        LinkedList queue = new LinkedList( parent.getChildren() );
        while( queue.size() != 0 ) {
            Element child = (Element)queue.getFirst();
            v.visit( child );
            queue.addAll( child.getChildren() );
            queue.removeFirst();
        }
    }

    /**
     * <p>
 
View Full Code Here


    }
   
//    console.out.println("DM is " + dm.getState());
    int nummod = 0;
    while (fs.size() > 0) {
      start = ((Integer) fs.removeFirst()).intValue();
      end = ((Integer) fe.removeFirst()).intValue();
      for (int i = start; i <= end; i++) {
        nummod++;
        // DEBUG
//        console.out.println("Setting priority for file " + i + " to " + newprio);
View Full Code Here

                        break;
                    }
                }

                if (lastKnownLength != 0 && readSize > totalReadSize) {
                    lines.removeFirst();
                }
            } finally {
                bfs.close();
            }
           
View Full Code Here

                throw new ChaiDBException(ErrorCode.LOCK_NULL, "The lock is null in the entry which treeid is exist.");
            else {
                if (lock.size() == 1) {
                    removeLock(treeName);
                }
                return (Lock) lock.removeFirst();
            }
        } else {
            return null;
        }
    }
View Full Code Here

      LinkedList msgs = state.getASFMessages();
     
      while (msgs.size() > 0)
      {
         AsfMessageHolder holder = (AsfMessageHolder)msgs.removeFirst();

         if (trace) { log.trace("sending " + holder.msg + " to the message listener" ); }
        
         MessageCallbackHandler.callOnMessage(del, state.getDistinguishedListener(), holder.consumerID,
                                              holder.queueName, false,
View Full Code Here

      {
         LinkedList ll = linkedLists[i];
        
         if (!ll.isEmpty())
         {
            obj = ll.removeFirst();
            break;
         }
                          
      }
     
View Full Code Here

  {
    Object o = null;
    LinkedList stack = (LinkedList) threadStack.get();
    if (stack != null)
    {
      o = stack.removeFirst();
    }
    return o;
  }
 
  public boolean empty()
View Full Code Here

   
    if (stack == null || stack.size() == 0) {
      throw new EmptyStackException();
    }
   
    Object result = stack.removeFirst();
    if (stack.size() > 0)
      currentTopAttributes.put(key, stack.getFirst());
    return result;
  }
View Full Code Here

                    final int[] indices = reaction.indices;
                    args = new Object[indices.length];
                    for ( int i = 0 ; i < indices.length ; ++i ) {
                        final int readIndex = indices[i];
                        final LinkedList reading = writes[readIndex];
                        args[i] = reading.removeFirst();
                        if (reading.isEmpty()) {
                            mask &= ~(1L << readIndex);
                        }
                    }
                    selectedReaction = reaction;
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

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.