@Test public void testConcat_Array() { Series<String> s1 = Series.forData("m", "n"); Series<String> s2 = Series.forData("a", "b"); Series<String> s3 = Series.forData("d"); Series<String> c = SeriesConcat.concat(s1, s2, s3); new SeriesAsserts(c).expectData("m", "n", "a", "b", "d"); }
public static <T> Series<T> concat(Series<T>... concat) { int h = 0; for (Series<? extends T> s : concat) { h += s.size(); } T[] data = (T[]) new Object[h]; int offset = 0; for (Series<? extends T> s : concat) { int len = s.size(); s.copyTo(data, 0, offset, len); offset += len; } return new ArraySeries<>(data); }
SeriesConcat { public static <T> Series<T> concat(Series<T>... concat) { int h = 0; for (Series<? extends T> s : concat) { h += s.size(); } T[] data = (T[]) new Object[h]; int offset = 0; for (Series<? extends T> s : concat) { int len = s.size(); s.copyTo(data, 0, offset, len); offset += len; } return new ArraySeries<>(data); } }
SeriesConcat { public static <T> Series<T> concat(Series<T>... concat) { int h = 0; for (Series<? extends T> s : concat) { h += s.size(); } T[] data = (T[]) new Object[h]; int offset = 0; for (Series<? extends T> s : concat) { int len = s.size(); s.copyTo(data, 0, offset, len); offset += len; } return new ArraySeries<>(data); }  }
SeriesConcat { public static <T> Series<T> concat(Series<T>... concat) { int h = 0; for (Series<? extends T> s : concat) { h += s.size(); } T[] data = (T[]) new Object[h]; int offset = 0; for (Series<? extends T> s : concat) { int len = s.size(); s.copyTo(data, 0, offset, len); offset += len; } return new ArraySeries<>(data); }  static Series<T> concat(Series<T>... concat); static Series<T> concat(Iterable<Series<T>> concat); static IntSeries intConcat(IntSeries... concat); static IntSeries intConcat(Iterable<IntSeries> concat); }
SeriesConcat { public static <T> Series<T> concat(Series<T>... concat) { int h = 0; for (Series<? extends T> s : concat) { h += s.size(); } T[] data = (T[]) new Object[h]; int offset = 0; for (Series<? extends T> s : concat) { int len = s.size(); s.copyTo(data, 0, offset, len); offset += len; } return new ArraySeries<>(data); }  static Series<T> concat(Series<T>... concat); static Series<T> concat(Iterable<Series<T>> concat); static IntSeries intConcat(IntSeries... concat); static IntSeries intConcat(Iterable<IntSeries> concat);  }