MCPcopy Index your code
hub / github.com/apache/groovy / subList

Method subList

src/main/java/groovy/lang/Tuple.java:104–111  ·  view source on GitHub ↗

{@inheritDoc}

(int fromIndex, int toIndex)

Source from the content-addressed store, hash-verified

102 * {@inheritDoc}
103 */
104 @SuppressWarnings("unchecked")
105 @Override
106 public List<E> subList(int fromIndex, int toIndex) {
107 int size = toIndex - fromIndex;
108 E[] newContent = (E[]) new Object[size];
109 System.arraycopy(contents, fromIndex, newContent, 0, size);
110 return new Tuple<>(newContent);
111 }
112
113 /**
114 * Returns a tuple containing the specified range of elements.

Callers 12

subTupleMethod · 0.95
findTokensToRenderMethod · 0.45
sectionMethod · 0.45
removeRangeMethod · 0.45
testSubListMethod · 0.45
testSubListMethod · 0.45
testSubListMethod · 0.45
testSubListMethod · 0.45
testEmptySubListMethod · 0.45

Calls 1

arraycopyMethod · 0.80

Tested by 8

testSubListMethod · 0.36
testSubListMethod · 0.36
testSubListMethod · 0.36
testSubListMethod · 0.36
testEmptySubListMethod · 0.36