@NonNull public IAndroidTarget[] getMissingTargets() { synchronized (mLocalPackages) { if (mCachedMissingTargets == null) { Map<MissingTarget, MissingTarget> result = Maps.newHashMap(); Set<ISystemImage> seen = Sets.newHashSet(); for (IAndroidTarget target : getTargets()) { Collections.addAll(seen, target.getSystemImages()); } for (LocalPkgInfo local : getPkgsInfos(PkgType.PKG_ADDON_SYS_IMAGE)) { LocalAddonSysImgPkgInfo info = (LocalAddonSysImgPkgInfo) local; ISystemImage image = info.getSystemImage(); if (!seen.contains(image)) { addOrphanedSystemImage(image, info.getDesc(), result); } } for (LocalPkgInfo local : getPkgsInfos(PkgType.PKG_SYS_IMAGE)) { LocalSysImgPkgInfo info = (LocalSysImgPkgInfo) local; ISystemImage image = info.getSystemImage(); if (!seen.contains(image)) { addOrphanedSystemImage(image, info.getDesc(), result); } } mCachedMissingTargets = result.keySet(); } return mCachedMissingTargets.toArray(new IAndroidTarget[mCachedMissingTargets.size()]); } }
private MapMessage newMapMessage(Map<String, Object> body) throws JMSException { MapMessage message = new MapMessageImpl(); for (String key : body.keySet()) { Object value = body.get(key); message.setObject(key, value); } return message; }
public String urlTransform(String baseurl, Map<String, String> param) { String url = baseurl; for (String key : param.keySet()) { url = url + "&" + key + "=" + param.get(key); } System.out.println(url); return url; }
/** * If no experiments were specified, inject into statisticsQuery a superset of all experiments for * which stats exist across all attributes * * @param statisticsQuery * @param statisticsStorage */ private static void setQueryExperiments( StatisticsQueryCondition statisticsQuery, StatisticsStorage statisticsStorage) { Set<ExperimentInfo> exps = statisticsQuery.getExperiments(); if (exps .isEmpty()) { // No experiments conditions were specified - assemble a superset of all // experiments for which stats exist across all attributes for (EfAttribute attr : statisticsQuery.getAttributes()) { Map<ExperimentInfo, ConciseSet> expsToStats = getStatisticsForAttribute(statisticsQuery.getStatisticsType(), attr, statisticsStorage); if (expsToStats != null) exps.addAll(expsToStats.keySet()); } statisticsQuery.inExperiments(exps); } }
public List<SqlMoniker> getAllSchemaObjectNames(List<String> names) { final OptiqSchema schema = getSchema(names); if (schema == null) { return ImmutableList.of(); } final List<SqlMoniker> result = new ArrayList<SqlMoniker>(); final Map<String, OptiqSchema> schemaMap = schema.getSubSchemaMap(); for (String subSchema : schemaMap.keySet()) { result.add(new SqlMonikerImpl(schema.path(subSchema), SqlMonikerType.SCHEMA)); } for (String table : schema.getTableNames()) { result.add(new SqlMonikerImpl(schema.path(table), SqlMonikerType.TABLE)); } final NavigableSet<String> functions = schema.getFunctionNames(); for (String function : functions) { // views are here as well result.add(new SqlMonikerImpl(schema.path(function), SqlMonikerType.FUNCTION)); } return result; }
/** @return collection of the all table names registered in the system (system and non-system) */ public Set<String> getTables() { return tables.keySet(); }
/** @return collection of the non-system tables */ public List<String> getNonSystemTables() { return ImmutableList.copyOf(Sets.difference(tables.keySet(), systemKeyspaceNames)); }
public Collection<String> types() { return mappers.keySet(); }