Examples of removeFirst()


Examples of java.util.LinkedList.removeFirst()

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

Examples of java.util.LinkedList.removeFirst()

   
    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

Examples of java.util.LinkedList.removeFirst()

                    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

Examples of java.util.LinkedList.removeFirst()

            queue.add( "" );
        }

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

            File currentDir = new File( dir, path );

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

Examples of java.util.LinkedList.removeFirst()

    public Object pop() {
        LinkedList linkedList = ((LinkedList) threadLocal.get());
        if (linkedList.isEmpty()) {
            return null;
        }
        return linkedList.removeFirst();
    }

    public Object peek() {
        LinkedList linkedList = ((LinkedList) threadLocal.get());
        if (linkedList.isEmpty()) {
View Full Code Here

Examples of java.util.LinkedList.removeFirst()

            // Check the job queue.
            synchronized(jobQueue) {
                if(jobQueue.size() > 0) {
                    // Remove the first job.
                    dequeuedObject = jobQueue.removeFirst();
                } else {
                    try {
                        // Wait for a notify() on the queue.
                        jobQueue.wait();
                        continue;
View Full Code Here

Examples of java.util.LinkedList.removeFirst()

            // Check the job queue.
            synchronized(jobQueue) {
                if(jobQueue.size() > 0) {
                    // Remove the first job.
                    dequeuedObject = jobQueue.removeFirst();
                } else {
                    try {
                        // Wait for a notify() on the queue.
                        jobQueue.wait();
                        continue;
View Full Code Here

Examples of java.util.LinkedList.removeFirst()

                  !m_suspended && i >= 0; --i )
            {
                final LinkedList queue = m_priorityQueues[i];
                synchronized ( queue ) {
                    if ( !queue.isEmpty() ) {
                        runnable = (Runnable)queue.removeFirst();
                        break;
                    }
                }
            }
View Full Code Here

Examples of java.util.LinkedList.removeFirst()

    public void popPrefixMapping(String prefix) {
        LinkedList stack = (LinkedList) xmlPrefixMapper.get(prefix);
        if (stack == null || stack.size() == 0) {
            // XXX throw new Exception("XXX");
        }
        stack.removeFirst();
    }

    /*
     * Returns the URI to which the given prefix maps.
     *
 
View Full Code Here

Examples of java.util.LinkedList.removeFirst()

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

         if (trace) { log.trace("sending " + holder.msg + " to the message listener" ); }

         ClientConsumer.callOnMessageStatic(del, state.getDistinguishedListener(), holder.consumerID,
                                              holder.queueName, false,
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.