List of usage examples for com.google.common.collect Sets newHashSet
public static <E> HashSet<E> newHashSet(Iterator<? extends E> elements)
From source file:org.sonatype.nexus.plugins.capabilities.Tag.java
/** * Convenience method for creating a set of tags *//*from w w w . jav a 2 s .c o m*/ public static Set<Tag> tags(final Tag... tags) { return Sets.newHashSet(checkNotNull(tags, "tags")); }
From source file:com.google.api.codegen.py.PythonProtoFileInitializer.java
@Override public PythonImportHandler getImportHandler(ProtoFile file) { if (importableProtoFiles == null) { importableProtoFiles = Sets.newHashSet((new ProtoFileView()).getElementIterable(file.getModel())); }/*w w w . j a v a 2s .co m*/ return new PythonImportHandler(file, importableProtoFiles); }
From source file:com.tjtolley.carcassonne.game.Game.java
public Game(String name, UUID id, TileDeck deck)//, List<Player> players) { this.map = HashBasedTable.create(); this.gameName = name; this.id = id; // this.players = players; this.placedTiles = Lists.newArrayList(); this.placeableLocations = Sets.newHashSet(new Position(0, 0)); this.deck = deck; }
From source file:org.gradle.internal.resource.transport.file.FileConnectorFactory.java
@Override public Set<String> getSupportedProtocols() { return Sets.newHashSet("file"); }
From source file:com.codereligion.diff.util.ToStringSerializer.java
public ToStringSerializer(final Class<?>... includedTypes) { this.includedTypes = Sets.newHashSet(includedTypes); }
From source file:org.gradle.api.internal.artifacts.ivyservice.moduleconverter.CompositeResolveLocalComponentFactory.java
public CompositeResolveLocalComponentFactory(LocalComponentFactory... factories) { this.factories = Sets.newHashSet(factories); }
From source file:com.thoughtworks.go.server.security.userdetail.GoUserPrinciple.java
public GoUserPrinciple(String username, String displayName, GrantedAuthority... authorities) { this(username, displayName, Sets.newHashSet(authorities)); }
From source file:org.apache.brooklyn.rest.BrooklynRestApp.java
public BrooklynRestApp() { singletons = Sets.newHashSet(BrooklynRestApi.getAllResources()); }
From source file:com.google.javascript.jscomp.newtypes.NaivePersistentSet.java
public PersistentSet<K> with(K key) { Set<K> newSet = Sets.newHashSet(this.set); newSet.add(key);/*from w w w . j a va 2 s .c o m*/ return new NaivePersistentSet<>(newSet); }
From source file:org.gradle.vcs.internal.SimpleVersionControlSystem.java
@Override public Set<VersionRef> getAvailableVersions(VersionControlSpec spec) { return Sets.newHashSet(getDefaultBranch(spec)); }