Here you can find the source of toQueue(T[] array)
Parameter | Description |
---|---|
T | The T element. |
array | An array of T. |
private static <T> Queue<T> toQueue(T[] array)
//package com.java2s; import java.util.LinkedList; import java.util.Queue; public class Main { /**//from w w w . j a v a2 s . c o m * Gets a queue from a property path. * * @param propPath The property path. * @return A queue from the property path. */ private static Queue<String> toQueue(String propPath) { String[] parts = propPath.split("\\."); return toQueue(parts); } /** * Converts an array of T into a Queue of T. * * @param <T> The T element. * @param array An array of T. * @return A queue of T. */ private static <T> Queue<T> toQueue(T[] array) { Queue<T> q = new LinkedList<T>(); for (T a : array) { q.add(a); } return q; } }