List of usage examples for com.google.common.collect ImmutableSortedSet copyOf
public static <E extends Comparable<? super E>> ImmutableSortedSet<E> copyOf(E[] elements)
From source file:edu.mit.streamjit.impl.compiler2.Actor.java
public ImmutableSortedSet<Integer> writes(Storage storage, Range<Integer> iterations) { List<ImmutableSortedSet<Integer>> list = new ArrayList<>(outputs().size()); for (int output = 0; output < outputs().size(); ++output) if (outputs().get(output).equals(storage)) list.add(translateOutputIndices(output, pushes(output, iterations))); return ImmutableSortedSet.copyOf(Iterables.concat(list)); }
From source file:edu.harvard.med.screensaver.model.screens.Screen.java
public SortedSet<AssayPlate> findAssayPlates(final int plateNumber) { return ImmutableSortedSet.copyOf(Iterables.filter(getAssayPlates(), new Predicate<AssayPlate>() { public boolean apply(AssayPlate ap) { return ap.getPlateNumber() == plateNumber; }//w ww . j a v a 2 s . c om })); }
From source file:com.facebook.buck.cxx.toolchain.CxxBuckConfig.java
public ImmutableSortedSet<String> getConflictingHeaderBasenameWhitelist() { return ImmutableSortedSet .copyOf(delegate.getListWithoutComments(cxxSection, CONFLICTING_HEADER_BASENAME_WHITELIST)); }
From source file:com.facebook.buck.android.exopackage.RealAndroidDevice.java
@Override public ImmutableSortedSet<Path> listDirRecursive(Path root) throws Exception { String lsOutput = executeCommandWithErrorChecking("ls -R " + root + " | cat"); Set<Path> paths = new HashSet<>(); Set<Path> dirs = new HashSet<>(); Path currentDir = null;/* www . j a v a 2 s . co m*/ Pattern dirMatcher = Pattern.compile(":$"); for (String line : Splitter.on(LINE_ENDING).omitEmptyStrings().split(lsOutput)) { if (dirMatcher.matcher(line).find()) { currentDir = root.relativize(Paths.get(line.substring(0, line.length() - 1))); dirs.add(currentDir); } else { assert currentDir != null; paths.add(currentDir.resolve(line)); } } return ImmutableSortedSet.copyOf(Sets.difference(paths, dirs)); }
From source file:test.org.auraframework.impl.adapter.ConfigAdapterImpl.java
@Override public void addInternalNamespace(String namespace) { if (namespace != null && !namespace.isEmpty()) { SYSTEM_NAMESPACES.put(namespace.toLowerCase(), Boolean.TRUE); CANONICAL_NAMESPACES.put(namespace, Boolean.TRUE); synchronized (CANONICAL_NAMESPACES) { CANONICAL_IMMUTABLE = ImmutableSortedSet.copyOf(CANONICAL_NAMESPACES.keySet()); }/* w w w . j a v a 2s . c o m*/ } }
From source file:test.org.auraframework.impl.adapter.ConfigAdapterImpl.java
@Override public void removeInternalNamespace(String namespace) { SYSTEM_NAMESPACES.remove(namespace.toLowerCase()); CANONICAL_NAMESPACES.remove(namespace); synchronized (CANONICAL_NAMESPACES) { CANONICAL_IMMUTABLE = ImmutableSortedSet.copyOf(CANONICAL_NAMESPACES.keySet()); }// w w w .j ava 2s .c o m }
From source file:test.org.auraframework.impl.adapter.ConfigAdapterImpl.java
@Override public void addPrivilegedNamespace(String namespace) { if (namespace != null && !namespace.isEmpty()) { PRIVILEGED_NAMESPACES.put(namespace, Boolean.TRUE); synchronized (PRIVILEGED_NAMESPACES) { PRIVILEGED_IMMUTABLE = ImmutableSortedSet.copyOf(PRIVILEGED_NAMESPACES.keySet()); }/* w w w . j a va 2 s .c o m*/ } }
From source file:test.org.auraframework.impl.adapter.ConfigAdapterImpl.java
@Override public void removePrivilegedNamespace(String namespace) { PRIVILEGED_NAMESPACES.remove(namespace); synchronized (PRIVILEGED_NAMESPACES) { PRIVILEGED_IMMUTABLE = ImmutableSortedSet.copyOf(PRIVILEGED_NAMESPACES.keySet()); }/*from ww w .j a v a 2 s .c om*/ }
From source file:com.facebook.buck.android.AndroidBinaryResourcesGraphEnhancer.java
private MergeAssets createMergeAssetsRule(ImmutableCollection<SourcePath> assetsDirectories, Optional<SourcePath> baseApk) { MergeAssets mergeAssets = new MergeAssets(buildTarget.withAppendedFlavors(MERGE_ASSETS_FLAVOR), projectFilesystem, ruleFinder, baseApk, ImmutableSortedSet.copyOf(assetsDirectories)); graphBuilder.addToIndex(mergeAssets); return mergeAssets; }
From source file:org.caleydo.core.util.color.ColorBrewer.java
@Override public SortedSet<Integer> getSizes() { return ImmutableSortedSet.copyOf(data.row(this).keySet()); }