List of usage examples for com.google.common.collect ImmutableList.Builder size
int size();
From source file:com.spotify.heroic.aggregation.Chain.java
@Override public AggregationInstance apply(final AggregationContext context) { ListIterator<Aggregation> it = chain.listIterator(chain.size()); AggregationContext current = context; final ImmutableSet.Builder<String> tags = ImmutableSet.builder(); final ImmutableList.Builder<AggregationInstance> chain = ImmutableList.builder(); while (it.hasPrevious()) { final AggregationInstance instance = it.previous().apply(current); tags.addAll(instance.requiredTags()); current = current.withRequiredTags(tags.build()); chain.add(instance);//from ww w. j av a 2s . c o m } return ChainInstance.fromList(Lists.reverse(chain.build())); }