List of usage examples for com.google.common.collect ImmutableSet of
@SuppressWarnings({ "unchecked" }) public static <E> ImmutableSet<E> of()
From source file:com.spotify.heroic.metadata.FindKeys.java
public static FindKeys of() { return new FindKeys(ImmutableList.of(), ImmutableSet.of(), 0, 0); }
From source file:io.prestosql.sql.analyzer.FreeLambdaReferenceExtractor.java
public static List<Expression> getFreeReferencesToLambdaArgument(Node node, Analysis analysis) { Visitor visitor = new Visitor(analysis); visitor.process(node, ImmutableSet.of()); return visitor.getFreeReferencesToLambdaArgument(); }
From source file:com.spotify.heroic.metadata.FindSeriesIds.java
public static FindSeriesIds of() { return new FindSeriesIds(ImmutableList.of(), ImmutableSet.of(), false); }
From source file:com.proofpoint.http.server.CidrSet.java
/** * @return A {@link CidrSet} identifying no addresses. */ public static CidrSet empty() { return new CidrSet(ImmutableSet.of()); }
From source file:com.spotify.heroic.metadata.FindSeries.java
public static FindSeries of() { return new FindSeries(ImmutableList.of(), ImmutableSet.of(), false); }
From source file:com.mysema.query.sql.RelationalPathExtractor.java
public static Set<RelationalPath<?>> extract(QueryMetadata md) { Set<RelationalPath<?>> known = ImmutableSet.of(); known = DEFAULT.visitJoins(md.getJoins(), known); for (Expression<?> p : md.getProjection()) { known = p.accept(DEFAULT, known); }/*from ww w . j av a 2 s.co m*/ for (OrderSpecifier<?> o : md.getOrderBy()) { known = o.getTarget().accept(DEFAULT, known); } for (Expression<?> g : md.getGroupBy()) { known = g.accept(DEFAULT, known); } if (md.getHaving() != null) { known = md.getHaving().accept(DEFAULT, known); } if (md.getWhere() != null) { known = md.getWhere().accept(DEFAULT, known); } return known; }
From source file:com.flaptor.indextank.query.analyzers.StopAnalyzer.java
private static Set<String> getStopWords(Map<Object, Object> analyzerConfiguration) { if (analyzerConfiguration.containsKey(STOPWORDS)) { JSONArray stopwordList = (JSONArray) analyzerConfiguration.get(STOPWORDS); Set<String> stopwords = new HashSet<String>(stopwordList.size()); for (Object stopword : stopwordList) { if (!(stopword instanceof String)) { throw new IllegalArgumentException("Stopwords aren't Strings"); }//from w w w . ja v a 2 s.co m stopwords.add((String) stopword); } return stopwords; } else { return ImmutableSet.of(); } }
From source file:com.google.javascript.jscomp.BlackHoleErrorManager.java
public BlackHoleErrorManager() { super(ImmutableSet.of()); }
From source file:com.facebook.buck.versions.VersionedTargetGraphFactory.java
public static VersionedTargetGraph newInstance(Iterable<TargetNode<?, ?>> nodes) { Map<BuildTarget, TargetNode<?, ?>> builder = new HashMap<>(); for (TargetNode<?, ?> node : nodes) { builder.put(node.getBuildTarget(), node); }/*from w w w . j av a 2 s . co m*/ ImmutableMap<BuildTarget, TargetNode<?, ?>> map = ImmutableMap.copyOf(builder); MutableDirectedGraph<TargetNode<?, ?>> graph = new MutableDirectedGraph<>(); for (TargetNode<?, ?> node : map.values()) { graph.addNode(node); for (BuildTarget dep : node.getDeps()) { graph.addEdge(node, Preconditions.checkNotNull(map.get(dep), dep)); } } return new VersionedTargetGraph(graph, map, ImmutableSet.of()); }
From source file:com.google.idea.blaze.base.run.testlogs.BlazeCommandLogParser.java
/** Finds log location and target label for all tests listed in the master log. */ public static ImmutableSet<Label> parseTestTargets(File commandLog) { try (Stream<String> stream = Files.lines(Paths.get(commandLog.getPath()))) { return parseTestTargets(stream); } catch (IOException e) { logger.warn("Error parsing master log", e); return ImmutableSet.of(); }/* w w w. j av a 2 s . c om*/ }