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

Method get

output/java_guava/1.4.18/Iterables.java:763–768  ·  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

761
762
763 public static <T> T get(Iterable<T> iterable, int position) {
764 checkNotNull(iterable);
765 return (iterable instanceof List)
766 ? ((List<T>) iterable).get(position)
767 : Iterators.get(iterable.iterator(), position);
768 }
769
770 /**
771 * 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