List of usage examples for com.google.common.collect ImmutableMultiset.Builder addAll
boolean addAll(Collection<? extends E> c);
From source file:org.apache.aurora.scheduler.filter.AttributeAggregate.java
public void updateAttributeAggregate(IHostAttributes attributes) { // If the aggregate supplier has not been populated there is no need to update it here. // All tasks attributes will be picked up by the wrapped task query if executed at a // later point in time. if (isInitialized) { final Supplier<Multiset<Pair<String, String>>> previous = aggregate; aggregate = Suppliers.memoize(() -> { ImmutableMultiset.Builder<Pair<String, String>> builder = new ImmutableMultiset.Builder<>(); builder.addAll(previous.get()); addAttributes(builder, attributes.getAttributes()); return builder.build(); });/*w w w. j ava 2s .c om*/ } }