public class FilterIncrementalFileMergerInput extends DelegateIncrementalFileMergerInput
IncrementalFileMergerInput that filters input based on a predicate over the accepted
paths. This input will effectively create a view with a subset of another input.| Constructor and Description |
|---|
FilterIncrementalFileMergerInput(IncrementalFileMergerInput input,
java.util.function.Predicate<java.lang.String> pathsAccepted)
Creates a new incremental input based on another input filtering all files whose
OS-independent path are not accepted by the provided predicate.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableSet<java.lang.String> |
getAllPaths()
Obtains all OS-independent paths of all files that in this input, regardless of being changed
or not.
|
com.android.ide.common.resources.FileStatus |
getFileStatus(java.lang.String path)
Obtains the status of a path in this input.
|
com.google.common.collect.ImmutableSet<java.lang.String> |
getUpdatedPaths()
Obtains all OS-independent paths of all files that were changed in this input.
|
java.io.InputStream |
openPath(java.lang.String path)
Opens a path for reading.
|
close, getName, openpublic FilterIncrementalFileMergerInput(@NonNull
IncrementalFileMergerInput input,
@NonNull
java.util.function.Predicate<java.lang.String> pathsAccepted)
input - the input to filterpathsAccepted - predicate that accepts only paths that should be in the output@NonNull public com.google.common.collect.ImmutableSet<java.lang.String> getUpdatedPaths()
IncrementalFileMergerInputgetUpdatedPaths in interface IncrementalFileMergerInputgetUpdatedPaths in class DelegateIncrementalFileMergerInput@NonNull public com.google.common.collect.ImmutableSet<java.lang.String> getAllPaths()
IncrementalFileMergerInputgetAllPaths in interface IncrementalFileMergerInputgetAllPaths in class DelegateIncrementalFileMergerInput@Nullable
public com.android.ide.common.resources.FileStatus getFileStatus(@NonNull
java.lang.String path)
IncrementalFileMergerInputgetFileStatus in interface IncrementalFileMergerInputgetFileStatus in class DelegateIncrementalFileMergerInputpath - the OS-independent path; the path may or not exist in the inputnull if the path does not exist in the input or
if the path has not been changed;
null is returned if and only if !getUpdatedPaths().contains(path)@NonNull
public java.io.InputStream openPath(@NonNull
java.lang.String path)
IncrementalFileMergerInputopenPath in interface IncrementalFileMergerInputopenPath in class DelegateIncrementalFileMergerInputpath - the pathOpenableCloseable.close() is
called