List of usage examples for com.google.common.collect Iterables addAll
public static <T> boolean addAll(Collection<T> addTo, Iterable<? extends T> elementsToAdd)
From source file:com.zimbra.soap.account.type.AccountZimletProperty.java
public static List<ZimletProperty> toInterfaces(Iterable<AccountZimletProperty> params) { if (params == null) return null; List<ZimletProperty> newList = Lists.newArrayList(); Iterables.addAll(newList, params); return newList; }
From source file:com.zimbra.soap.mail.message.ModifyFilterRulesRequest.java
public void setFilterRules(Iterable<FilterRule> filterRules) { this.filterRules.clear(); if (filterRules != null) { Iterables.addAll(this.filterRules, filterRules); }/*from w w w. jav a 2s . com*/ }
From source file:eu.interedition.text.util.OverlapAnalyzer.java
@Override public void start(long offset, Iterable<Annotation> annotations) { Iterables.addAll(started, annotations); }
From source file:com.lastcalc.parsers.collections.ApplyTo.java
@Override public ParseResult parse(final TokenList tokens, final int templatePos, final ParserContext context) { final UserDefinedParser udp = (UserDefinedParser) tokens.get(templatePos + 1); final Object datastructure = tokens.get(templatePos + 3); List<Object> ret; if (datastructure instanceof List) { if (udp.variables.size() != 1 || udp.getTemplate().size() != 1) return ParseResult.fail(); final List<Object> list = (List<Object>) datastructure; ret = Lists.newArrayListWithCapacity(list.size() * 4); ret.add("["); for (final Object o : list) { final TokenList r = context.parseEngine .parseAndGetLastStep(udp.parse(TokenList.createD(o), 0).output, context); Iterables.addAll(ret, r); ret.add(","); }// ww w . java 2 s . c om ret.set(ret.size() - 1, "]"); // Overwrite last comma } else return ParseResult.fail(); return ParseResult.success( tokens.replaceWithTokenList(templatePos, templatePos + template.size(), TokenList.create(ret))); }
From source file:com.zimbra.soap.mail.type.SingleDates.java
public void setDtvals(Iterable<DtVal> dtVals) { this.dtVals.clear(); if (dtVals != null) { Iterables.addAll(this.dtVals, dtVals); }/*w w w . j a v a2 s . co m*/ }
From source file:com.zimbra.soap.mail.message.GetCalendarItemSummariesResponse.java
public void setCalEntries(Iterable<LegacyCalendaringData> calEntries) { this.calEntries.clear(); if (calEntries != null) { Iterables.addAll(this.calEntries, calEntries); }/*ww w . jav a2s.c om*/ }
From source file:com.zimbra.soap.account.message.GetRightsRequest.java
public void setAces(Iterable<Right> aces) { this.aces.clear(); if (aces != null) { Iterables.addAll(this.aces, aces); }/* w w w . j a v a 2s . c om*/ }
From source file:com.zimbra.soap.admin.message.GetDistributionListMembershipResponse.java
public GetDistributionListMembershipResponse setDls(Iterable<DistributionListMembershipInfo> dls) { this.dls.clear(); if (dls != null) { Iterables.addAll(this.dls, dls); }/*from www . j a va 2s. c o m*/ return this; }
From source file:me.taylorkelly.mywarp.warp.WarpSignManager.java
/** * Creates an instance.//from ww w. java 2 s. co m * * @param identifiers the identifiers to identify a vail warp sign * @param economyManager the EconomyManager this manager will act on * @param manager the WarpManager this manager will act on */ public WarpSignManager(Iterable<String> identifiers, EconomyManager economyManager, WarpManager manager) { this.economyManager = economyManager; this.identifiers = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER); Iterables.addAll(this.identifiers, identifiers); this.manager = manager; }
From source file:org.feature4j.config.CompositeFeatureOverridesFactory.java
@Override public Iterable<FeatureOverride> createOverrides(FeatureConfiguration featureConfiguration) { List<FeatureOverride> allFeatureOverrides = new ArrayList<>(); for (FeatureOverridesFactory factory : featureOverridesFactories) { Iterable<FeatureOverride> featureOverrides = factory.createOverrides(featureConfiguration); if (featureOverrides != null) { Iterables.addAll(allFeatureOverrides, featureOverrides); }//from w ww . j a v a2s . c om } return allFeatureOverrides; }