MCPcopy Create free account
hub / github.com/antlr/codebuff / get

Method get

corpus/java/training/guava/collect/Iterables.java:705–710  ·  view source on GitHub ↗

Returns the element at the specified position in an iterable. @param position position of the element to return @return the element at the specified position in iterable @throws IndexOutOfBoundsException if position is negative or greater than or equal to the size of {@code iter

(Iterable<T> iterable, int position)

Source from the content-addressed store, hash-verified

703 * greater than or equal to the size of {@code iterable}
704 */
705 public static <T> T get(Iterable<T> iterable, int position) {
706 checkNotNull(iterable);
707 return (iterable instanceof List)
708 ? ((List<T>) iterable).get(position)
709 : Iterators.get(iterable.iterator(), position);
710 }
711
712 /**
713 * Returns the element at the specified position in an iterable or a default

Callers 1

getMethod · 0.95

Calls 9

getMethod · 0.95
checkNonnegativeMethod · 0.95
castMethod · 0.95
advanceMethod · 0.95
getNextMethod · 0.95
getMethod · 0.65
iteratorMethod · 0.65
sizeMethod · 0.65
checkNotNullMethod · 0.45

Tested by

no test coverage detected