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

Method iterable

corpus/java/training/guava/base/Joiner.java:460–481  ·  view source on GitHub ↗
(
      final Object first, final Object second, final Object[] rest)

Source from the content-addressed store, hash-verified

458 }
459
460 private static Iterable<Object> iterable(
461 final Object first, final Object second, final Object[] rest) {
462 checkNotNull(rest);
463 return new AbstractList<Object>() {
464 @Override
465 public int size() {
466 return rest.length + 2;
467 }
468
469 @Override
470 public Object get(int index) {
471 switch (index) {
472 case 0:
473 return first;
474 case 1:
475 return second;
476 default:
477 return rest[index - 2];
478 }
479 }
480 };
481 }
482}

Callers 2

appendToMethod · 0.95
joinMethod · 0.95

Calls 1

checkNotNullMethod · 0.45

Tested by

no test coverage detected