Java Queue Usage addStringArraytoQueue(Queue set, String[] array)

Here you can find the source of addStringArraytoQueue(Queue set, String[] array)

Description

add String Arrayto Queue

License

Apache License

Declaration

public static Queue<String> addStringArraytoQueue(Queue<String> set, String[] array) 

Method Source Code

//package com.java2s;
/**/*from   w  w w.j a v  a 2  s. com*/
 * 
 * Copyright (c) 2012 - 2014 Carnegie Mellon University
 * 
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at
    
  http://www.apache.org/licenses/LICENSE-2.0
    
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
 * 
 * @author Chaitra Radhakrishna, Language Technology Institute, School of Computer Science, Carnegie-Mellon University.
 * email: wei.zhang@cs.cmu.edu
 *
 * 
 */

import java.util.Queue;

public class Main {
    public static Queue<String> addStringArraytoQueue(Queue<String> set, String[] array) {
        //set = checkSet(set);

        for (String string : array) {
            set.add(string);

        }

        return set;

    }
}

Related

  1. addElementsToQueueInSingleThread(int numberOfElements, Queue queue, int element)
  2. asString(Queue values)
  3. bQToString(Queue bQ)
  4. convertQueueToArray(Queue q)
  5. elementFail(Queue q)

    HOME | Copyright © www.java2s.com 2016