Java ArrayDeque Create createArrayDeque()

Here you can find the source of createArrayDeque()

Description

create Array Deque

License

Open Source License

Declaration

public static <E> ArrayDeque<E> createArrayDeque() 

Method Source Code


//package com.java2s;

import java.util.ArrayDeque;

import java.util.Collection;

public class Main {

    public static <E> ArrayDeque<E> createArrayDeque() {
        return new ArrayDeque<E>();
    }/* w w  w.ja v  a2s . c o m*/

    public static <E> ArrayDeque<E> createArrayDeque(Collection<? extends E> collection) {
        if (collection == null) {
            return null;
        }

        return new ArrayDeque<E>(collection);
    }

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

Related

  1. newArrayDeque()
  2. newArrayDeque(int initSize)