public abstract class SourceSortedSet extends Object implements TargetTranslatable<SourceSortedSet>
SortedSet
of unnamed SourcePath
s or a
SortedMap
of names to SourcePath
s. Commonly used to represent the input
srcs
parameter of rules where source "names" may be important (e.g. to control
layout of C++ headers).Modifier and Type | Class and Description |
---|---|
static class |
SourceSortedSet.Type |
Modifier and Type | Field and Description |
---|---|
static SourceSortedSet |
EMPTY |
Constructor and Description |
---|
SourceSortedSet() |
Modifier and Type | Method and Description |
---|---|
protected void |
check() |
static SourceSortedSet |
concat(Iterable<SourceSortedSet> elements)
Concatenates elements of the given lists into a single list.
|
abstract Optional<com.google.common.collect.ImmutableSortedMap<String,SourcePath>> |
getNamedSources() |
com.google.common.collect.ImmutableList<SourcePath> |
getPaths() |
abstract SourceSortedSet.Type |
getType() |
abstract Optional<com.google.common.collect.ImmutableSortedSet<SourcePath>> |
getUnnamedSources() |
boolean |
isEmpty() |
static SourceSortedSet |
of(SourceSortedSet.Type type,
Optional<? extends com.google.common.collect.ImmutableSortedSet<SourcePath>> unnamedSources,
Optional<? extends com.google.common.collect.ImmutableSortedMap<String,SourcePath>> namedSources) |
static SourceSortedSet |
ofNamedSources(com.google.common.collect.ImmutableSortedMap<String,SourcePath> namedSources) |
static SourceSortedSet |
ofUnnamedSources(com.google.common.collect.ImmutableSortedSet<SourcePath> unnamedSources) |
com.google.common.collect.ImmutableMap<String,SourcePath> |
toNameMap(BuildTarget buildTarget,
SourcePathResolverAdapter pathResolver,
String parameterName) |
com.google.common.collect.ImmutableMap<String,SourcePath> |
toNameMap(BuildTarget buildTarget,
SourcePathResolverAdapter pathResolver,
String parameterName,
java.util.function.Predicate<SourcePath> filter,
java.util.function.Function<SourcePath,SourcePath> transform) |
Optional<SourceSortedSet> |
translateTargets(CellNameResolver cellPathResolver,
BaseName targetBaseName,
TargetNodeTranslator translator) |
public static final SourceSortedSet EMPTY
public abstract SourceSortedSet.Type getType()
public abstract Optional<com.google.common.collect.ImmutableSortedSet<SourcePath>> getUnnamedSources()
public abstract Optional<com.google.common.collect.ImmutableSortedMap<String,SourcePath>> getNamedSources()
@Value.Check protected void check()
public static SourceSortedSet ofUnnamedSources(com.google.common.collect.ImmutableSortedSet<SourcePath> unnamedSources)
public static SourceSortedSet ofNamedSources(com.google.common.collect.ImmutableSortedMap<String,SourcePath> namedSources)
public boolean isEmpty()
public com.google.common.collect.ImmutableMap<String,SourcePath> toNameMap(BuildTarget buildTarget, SourcePathResolverAdapter pathResolver, String parameterName, java.util.function.Predicate<SourcePath> filter, java.util.function.Function<SourcePath,SourcePath> transform)
public com.google.common.collect.ImmutableMap<String,SourcePath> toNameMap(BuildTarget buildTarget, SourcePathResolverAdapter pathResolver, String parameterName)
public com.google.common.collect.ImmutableList<SourcePath> getPaths()
public Optional<SourceSortedSet> translateTargets(CellNameResolver cellPathResolver, BaseName targetBaseName, TargetNodeTranslator translator)
translateTargets
in interface TargetTranslatable<SourceSortedSet>
public static SourceSortedSet concat(Iterable<SourceSortedSet> elements)
public static SourceSortedSet of(SourceSortedSet.Type type, Optional<? extends com.google.common.collect.ImmutableSortedSet<SourcePath>> unnamedSources, Optional<? extends com.google.common.collect.ImmutableSortedMap<String,SourcePath>> namedSources)