MCPcopy Create free account
hub / github.com/davidgiven/luje / toArray

Method toArray

lib/java/util/LinkedList.java:728–738  ·  view source on GitHub ↗

Returns a new array containing all elements contained in this LinkedList. @return an array of the elements from this LinkedList.

()

Source from the content-addressed store, hash-verified

726 * @return an array of the elements from this {@code LinkedList}.
727 */
728 @Override
729 public Object[] toArray() {
730 int index = 0;
731 Object[] contents = new Object[size];
732 Link<E> link = voidLink.next;
733 while (link != voidLink) {
734 contents[index++] = link.data;
735 link = link.next;
736 }
737 return contents;
738 }
739
740 /**
741 * Returns an array containing all elements contained in this

Callers

nothing calls this directly

Calls 3

newInstanceMethod · 0.95
getComponentTypeMethod · 0.80
getClassMethod · 0.80

Tested by

no test coverage detected