Java Queue Create getArrayQueue()

Here you can find the source of getArrayQueue()

Description

get Array Queue

License

Open Source License

Declaration

public static <E> Queue<E> getArrayQueue() 

Method Source Code


//package com.java2s;
import java.util.ArrayDeque;

import java.util.Collection;

import java.util.Queue;

public class Main {

    public static <E> Queue<E> getArrayQueue() {
        return new ArrayDeque<E>();
    }/*from  w w  w . j a va 2  s .  c o  m*/

    public static <E> Queue<E> getArrayQueue(Collection<? extends E> collection) {
        return new ArrayDeque<E>(collection);
    }

    public static <E> Queue<E> getArrayQueue(int initialCapacity) {
        return new ArrayDeque<E>(initialCapacity);
    }
}

Related

  1. getQueue()
  2. toQueue(T[] array)