Java Utililty Methods LinkedList Create

List of utility methods to do LinkedList Create

Description

The list of methods to do LinkedList Create are organized into topic(s).

Method

LinkedListcreateLinkedList(E... array)
create Linked List
LinkedList<E> newCollection = new LinkedList<E>();
if (array != null) {
    Collections.addAll(newCollection, array);
return newCollection;
LinkedListcreateLinkedList(Iterable c)
create Linked List
LinkedList<T> list = new LinkedList<T>();
iterableToCollection(c, list);
return list;
voidcrossProductInternal(int i, Object[][] arrays, Object[] work, LinkedList ret)
cross Product Internal
if (i == arrays.length) {
    ret.add(Arrays.copyOf(work, work.length));
    return;
for (Object item : arrays[i]) {
    work[i] = item;
    crossProductInternal(i + 1, arrays, work, ret);
LinkedListnewLinkedList(Collection c)
new Linked List
return new LinkedList<T>(c);
LinkedListnewLinkedList(Collection initData)
new Linked List
return new LinkedList<T>(initData);
LinkedListnewLinkedList(E... elements)
Creates a new LinkedList with the provided elements.
return new LinkedList<>(Arrays.asList(elements));
LinkedListnewLinkedList(T... elements)
new Linked List
return new LinkedList<T>(Arrays.asList(elements));
LinkedListprependAll(List ofList, LinkedList toList)
Add all elements of ofList to toList
if (ofList == null) {
    if (toList == null) {
        return new LinkedList();
    } else {
        return toList;
if (toList == null) {
...