@Test public void shouldConsolidatorsBeSuccessful() { Assert.assertEquals(2, Consolidators.createConsolidators(Arrays.asList(MinConsolidator.class, MaxConsolidator.class), 1).length); }
public static Consolidator[] createConsolidators(final List<? extends Class<? extends Consolidator>> consolidatorTypes, final int maxSamples) { Preconditions.checkNotNull(consolidatorTypes, "null consolidatorTypes"); Preconditions2.checkSize(maxSamples); final Consolidator[] consolidators = new Consolidator[consolidatorTypes.size()]; for (final Iterables2.Indexed<? extends Class<? extends Consolidator>> indexed : Iterables2.withIndex(consolidatorTypes)) { consolidators[indexed.index] = createConsolidator(indexed.value, maxSamples); } return consolidators; }
Consolidators { public static Consolidator[] createConsolidators(final List<? extends Class<? extends Consolidator>> consolidatorTypes, final int maxSamples) { Preconditions.checkNotNull(consolidatorTypes, "null consolidatorTypes"); Preconditions2.checkSize(maxSamples); final Consolidator[] consolidators = new Consolidator[consolidatorTypes.size()]; for (final Iterables2.Indexed<? extends Class<? extends Consolidator>> indexed : Iterables2.withIndex(consolidatorTypes)) { consolidators[indexed.index] = createConsolidator(indexed.value, maxSamples); } return consolidators; } }
Consolidators { public static Consolidator[] createConsolidators(final List<? extends Class<? extends Consolidator>> consolidatorTypes, final int maxSamples) { Preconditions.checkNotNull(consolidatorTypes, "null consolidatorTypes"); Preconditions2.checkSize(maxSamples); final Consolidator[] consolidators = new Consolidator[consolidatorTypes.size()]; for (final Iterables2.Indexed<? extends Class<? extends Consolidator>> indexed : Iterables2.withIndex(consolidatorTypes)) { consolidators[indexed.index] = createConsolidator(indexed.value, maxSamples); } return consolidators; } private  Consolidators(); }
Consolidators { public static Consolidator[] createConsolidators(final List<? extends Class<? extends Consolidator>> consolidatorTypes, final int maxSamples) { Preconditions.checkNotNull(consolidatorTypes, "null consolidatorTypes"); Preconditions2.checkSize(maxSamples); final Consolidator[] consolidators = new Consolidator[consolidatorTypes.size()]; for (final Iterables2.Indexed<? extends Class<? extends Consolidator>> indexed : Iterables2.withIndex(consolidatorTypes)) { consolidators[indexed.index] = createConsolidator(indexed.value, maxSamples); } return consolidators; } private  Consolidators(); static Consolidator createConsolidator(final Class<? extends Consolidator> type, final int maxSamples); static Consolidator[] createConsolidators(final List<? extends Class<? extends Consolidator>> consolidatorTypes, final int maxSamples); }
Consolidators { public static Consolidator[] createConsolidators(final List<? extends Class<? extends Consolidator>> consolidatorTypes, final int maxSamples) { Preconditions.checkNotNull(consolidatorTypes, "null consolidatorTypes"); Preconditions2.checkSize(maxSamples); final Consolidator[] consolidators = new Consolidator[consolidatorTypes.size()]; for (final Iterables2.Indexed<? extends Class<? extends Consolidator>> indexed : Iterables2.withIndex(consolidatorTypes)) { consolidators[indexed.index] = createConsolidator(indexed.value, maxSamples); } return consolidators; } private  Consolidators(); static Consolidator createConsolidator(final Class<? extends Consolidator> type, final int maxSamples); static Consolidator[] createConsolidators(final List<? extends Class<? extends Consolidator>> consolidatorTypes, final int maxSamples);  }