Package com.facebook.buck.rules.coercer
Class VersionMatchedCollection<T>
- java.lang.Object
-
- com.facebook.buck.rules.coercer.VersionMatchedCollection<T>
-
- All Implemented Interfaces:
TargetTranslatable<VersionMatchedCollection<T>>
public class VersionMatchedCollection<T> extends Object implements TargetTranslatable<VersionMatchedCollection<T>>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VersionMatchedCollection.Builder<T>
-
Constructor Summary
Constructors Constructor Description VersionMatchedCollection(com.google.common.collect.ImmutableList<Pair<com.google.common.collect.ImmutableMap<BuildTarget,Version>,T>> values)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> VersionMatchedCollection.Builder<T>
builder()
boolean
equals(Object o)
com.google.common.collect.ImmutableList<T>
getMatchingValues(com.google.common.collect.ImmutableMap<BuildTarget,Version> selected)
T
getOnlyMatchingValue(String source, com.google.common.collect.ImmutableMap<BuildTarget,Version> selected)
com.google.common.collect.ImmutableList<Pair<com.google.common.collect.ImmutableMap<BuildTarget,Version>,T>>
getValuePairs()
com.google.common.collect.ImmutableList<T>
getValues()
int
hashCode()
static <T> VersionMatchedCollection<T>
of()
String
toString()
Optional<VersionMatchedCollection<T>>
translateTargets(CellNameResolver cellPathResolver, BaseName targetBaseName, TargetNodeTranslator translator)
-
-
-
Constructor Detail
-
VersionMatchedCollection
public VersionMatchedCollection(com.google.common.collect.ImmutableList<Pair<com.google.common.collect.ImmutableMap<BuildTarget,Version>,T>> values)
-
-
Method Detail
-
getMatchingValues
public com.google.common.collect.ImmutableList<T> getMatchingValues(com.google.common.collect.ImmutableMap<BuildTarget,Version> selected)
-
getOnlyMatchingValue
public T getOnlyMatchingValue(String source, com.google.common.collect.ImmutableMap<BuildTarget,Version> selected)
- Returns:
- the only item that matches the given version map, or throw.
-
getValues
public com.google.common.collect.ImmutableList<T> getValues()
-
getValuePairs
public com.google.common.collect.ImmutableList<Pair<com.google.common.collect.ImmutableMap<BuildTarget,Version>,T>> getValuePairs()
-
of
public static <T> VersionMatchedCollection<T> of()
-
builder
public static <T> VersionMatchedCollection.Builder<T> builder()
-
translateTargets
public Optional<VersionMatchedCollection<T>> translateTargets(CellNameResolver cellPathResolver, BaseName targetBaseName, TargetNodeTranslator translator)
- Specified by:
translateTargets
in interfaceTargetTranslatable<T>
- Returns:
- if any changes are required, return the translated object.
-
-