MCPcopy
hub / github.com/google/guava / iterable

Method iterable

guava/src/com/google/common/base/Joiner.java:532–553  ·  view source on GitHub ↗
(
      @Nullable Object first, @Nullable Object second, @Nullable Object[] rest)

Source from the content-addressed store, hash-verified

530 }
531
532 private static Iterable<@Nullable Object> iterable(
533 @Nullable Object first, @Nullable Object second, @Nullable Object[] rest) {
534 checkNotNull(rest);
535 return new AbstractList<@Nullable Object>() {
536 @Override
537 public int size() {
538 return rest.length + 2;
539 }
540
541 @Override
542 public @Nullable Object get(int index) {
543 switch (index) {
544 case 0:
545 return first;
546 case 1:
547 return second;
548 default:
549 return rest[index - 2];
550 }
551 }
552 };
553 }
554
555 // cloned from ImmutableCollection
556 private static int expandedCapacity(int oldCapacity, int minCapacity) {

Callers 2

appendToMethod · 0.95
joinMethod · 0.95

Calls 1

checkNotNullMethod · 0.45

Tested by

no test coverage detected