List of usage examples for com.google.common.collect Sets newHashSet
public static <E> HashSet<E> newHashSet(Iterator<? extends E> elements)
From source file:com.opengamma.livedata.normalization.FieldFilter.java
public FieldFilter(FudgeContext context, String... fieldsToAccept) { this(Sets.newHashSet(fieldsToAccept), context); }
From source file:io.joynr.systemintegrationtest.jee.ConsumerRestApplication.java
@Override public Set<Class<?>> getClasses() { return Sets.newHashSet(ConsumerRestEndpoint.class); }
From source file:org.onosproject.cluster.ClusterMetadataServiceAdapter.java
@Override public ClusterMetadata getClusterMetadata() { final NodeId nid = new NodeId("test-node"); final IpAddress addr = IpAddress.valueOf(0); final Partition p = new DefaultPartition(PartitionId.from(1), Sets.newHashSet(nid)); return new ClusterMetadata("test-cluster", Sets.newHashSet(new DefaultControllerNode(nid, addr)), Sets.newHashSet(p));/* w w w . j a v a 2 s . c om*/ }
From source file:org.n3r.sandbox.db.mongo.model.heroes.Hero.java
public static Hero addBeast(Hero hero, Beast beast) { return new Hero(hero.getId(), hero.getFirstName(), hero.getLastName(), hero.getAddress(), hero.getChildren(), Sets.newHashSet(beast)); }
From source file:org.apache.brooklyn.camp.server.CampRestApp.java
@Override public Set<Object> getSingletons() { return Sets.newHashSet(CampRestResources.getAllResources()); }
From source file:org.gradle.plugins.ide.idea.model.internal.IdeaScopeMappingRule.java
IdeaScopeMappingRule(String... configurationNames) {
this.configurationNames = Sets.newHashSet(configurationNames);
}
From source file:it.infn.mw.iam.test.util.oauth.MockOAuth2Request.java
public MockOAuth2Request(String clientId, String[] scopes) { setClientId(clientId);/* w w w. ja va 2 s .c om*/ if (!Objects.isNull(scopes)) { setScope(Sets.newHashSet(scopes)); } else { setScope(Collections.emptySet()); } }
From source file:edu.cmu.lti.oaqa.ecd.funnel.SetBasedFunnel.java
public SetBasedFunnel(Iterable<String> traces) { this.set = Sets.newHashSet(traces); }
From source file:org.sonatype.nexus.capability.Tag.java
/** * Convenience method for creating a set of tags *//*from w w w . ja va 2s. c o m*/ public static Set<Tag> tags(final Tag... tags) { return Sets.newHashSet(checkNotNull(tags)); }
From source file:com.spotify.reaper.storage.postgresql.ClusterMapper.java
public Cluster map(int index, ResultSet r, StatementContext ctx) throws SQLException { String[] seedHosts = (String[]) r.getArray("seed_hosts").getArray(); return new Cluster(r.getString("name"), r.getString("partitioner"), Sets.newHashSet(seedHosts)); }