@Test void repeatShouldWorkWithTwoElements() { assertThat(Repeat.repeat(ELEMENT, 2)).containsExactly(ELEMENT, ELEMENT); }
public static <T> List<T> repeat(T element, int times) { Preconditions.checkArgument(times >= 0, "Times argument should be strictly positive"); return ImmutableList.copyOf( Iterables.limit( Iterables.cycle(element), times)); }
Repeat { public static <T> List<T> repeat(T element, int times) { Preconditions.checkArgument(times >= 0, "Times argument should be strictly positive"); return ImmutableList.copyOf( Iterables.limit( Iterables.cycle(element), times)); } }
Repeat { public static <T> List<T> repeat(T element, int times) { Preconditions.checkArgument(times >= 0, "Times argument should be strictly positive"); return ImmutableList.copyOf( Iterables.limit( Iterables.cycle(element), times)); }  }
Repeat { public static <T> List<T> repeat(T element, int times) { Preconditions.checkArgument(times >= 0, "Times argument should be strictly positive"); return ImmutableList.copyOf( Iterables.limit( Iterables.cycle(element), times)); }  static List<T> repeat(T element, int times); }
Repeat { public static <T> List<T> repeat(T element, int times) { Preconditions.checkArgument(times >= 0, "Times argument should be strictly positive"); return ImmutableList.copyOf( Iterables.limit( Iterables.cycle(element), times)); }  static List<T> repeat(T element, int times);  }