List of usage examples for com.google.common.collect Sets newLinkedHashSet
public static <E> LinkedHashSet<E> newLinkedHashSet()
From source file:org.gradle.api.internal.initialization.loadercache.HashClassPathSnapshotter.java
public ClassPathSnapshot snapshot(ClassPath classPath) { List<String> visitedFilePaths = Lists.newLinkedList(); Set<File> visitedDirs = Sets.newLinkedHashSet(); List<File> cpFiles = classPath.getAsFiles(); Adler32 checksum = new Adler32(); hash(checksum, visitedFilePaths, visitedDirs, cpFiles.iterator()); return new ClassPathSnapshotImpl(visitedFilePaths, checksum.getValue()); }
From source file:org.webtestingexplorer.state.SelectedElementsState.java
public SelectedElementsState(List<WebElementWithIdentifier> elements, String selectorKey) { this.selectorKey = selectorKey; identifiers = Sets.newLinkedHashSet(); for (WebElementWithIdentifier element : elements) { identifiers.add(element.getIdentifier()); }// ww w . j a v a2 s . com }
From source file:com.google.devtools.moe.client.Utils.java
public static Set<String> makeFilenamesRelative(Set<File> files, File basePath) { Set<String> result = Sets.newLinkedHashSet(); for (File f : files) { if (!f.getAbsolutePath().startsWith(basePath.getAbsolutePath())) { throw new MoeProblem("File %s is under %s but does not begin with it", f, basePath); }/*from ww w . j a v a 2s. c om*/ result.add(f.getAbsolutePath().substring(basePath.getAbsolutePath().length() + 1)); } return ImmutableSet.copyOf(result); }
From source file:org.nanoframework.orm.jedis.RedisClientExtImpl.java
@Override public List<String> lrange(String key, int start, int end) { Set<String> linkedSet = Sets.newLinkedHashSet(); List<String> range = super.lrange(key, start, end); if (!CollectionUtils.isEmpty(range)) { range.forEach(item -> linkedSet.add(item)); }//from w w w .j av a 2 s . co m if (this.specSource != null) { range = this.getSpecSource().lrange(key, start, end); range.forEach(item -> linkedSet.add(item)); } return Lists.newArrayList(linkedSet.iterator()); }
From source file:com.google.api.server.spi.config.scope.DisjunctAuthScopeExpression.java
@Override public String[] getAllScopes() { Set<String> allScopes = Sets.newLinkedHashSet(); for (AuthScopeExpression innerExpression : innerExpressions) { allScopes.addAll(Arrays.asList(innerExpression.getAllScopes())); }/*from ww w . j a v a2 s . co m*/ return allScopes.toArray(new String[allScopes.size()]); }
From source file:org.ldp4j.tutorial.frontend.util.Typed.java
private Typed(T value) { this.value = value; this.types = Sets.newLinkedHashSet(); }
From source file:org.terasology.logic.mod.ModInfo.java
public Set<String> getDependencies() { if (dependencies == null) { dependencies = Sets.newLinkedHashSet(); } return dependencies; }
From source file:org.jclouds.googlecompute.compute.functions.OrphanedGroupsFromDeadNodes.java
@Override public Set<String> apply(Set<? extends NodeMetadata> deadNodes) { Set<String> groups = Sets.newLinkedHashSet(); for (NodeMetadata deadNode : deadNodes) { groups.add(deadNode.getGroup()); }/*from ww w .j a v a 2s. c o m*/ Set<String> orphanedGroups = Sets.newLinkedHashSet(); for (String group : groups) { if (isOrphanedGroupPredicate.apply(group)) { orphanedGroups.add(group); } } return orphanedGroups; }
From source file:de.xaniox.heavyspleef.core.player.PlayerManager.java
public PlayerManager(HeavySpleef heavySpleef) { this.onlineSpleefPlayers = Sets.newLinkedHashSet(); this.heavySpleef = heavySpleef; Bukkit.getPluginManager().registerEvents(this, heavySpleef.getPlugin()); for (Player player : Bukkit.getOnlinePlayers()) { SpleefPlayer spleefPlayer = new SpleefPlayer(player, heavySpleef); onlineSpleefPlayers.add(spleefPlayer); }/* w w w . j av a 2s. com*/ }
From source file:org.eclipse.moquette.spi.impl.subscriptions.TreeNode.java
Set<Subscription> subscriptions() { Collection<Subscription> values = subs.values(); Set<Subscription> result = Sets.newLinkedHashSet(); result.addAll(values); return result; }