Package org.sonar.api.batch.fs.internal
Class RelativePathPredicate
- java.lang.Object
-
- org.sonar.api.batch.fs.internal.AbstractFilePredicate
-
- org.sonar.api.batch.fs.internal.RelativePathPredicate
-
- All Implemented Interfaces:
java.lang.Comparable<OptimizedFilePredicate>,FilePredicate,OptimizedFilePredicate
public class RelativePathPredicate extends AbstractFilePredicate
- Since:
- 4.2
-
-
Field Summary
-
Fields inherited from class org.sonar.api.batch.fs.internal.AbstractFilePredicate
DEFAULT_PRIORITY, USE_INDEX
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapply(InputFile f)Test if provided file is valid for this predicatejava.lang.Iterable<InputFile>get(FileSystem.Index index)Get all files that are valid for this predicate.java.lang.Stringpath()intpriority()For optimization.-
Methods inherited from class org.sonar.api.batch.fs.internal.AbstractFilePredicate
compareTo, filter
-
-
-
-
Method Detail
-
path
public java.lang.String path()
-
apply
public boolean apply(InputFile f)
Description copied from interface:FilePredicateTest if provided file is valid for this predicate
-
get
public java.lang.Iterable<InputFile> get(FileSystem.Index index)
Description copied from interface:OptimizedFilePredicateGet all files that are valid for this predicate.- Specified by:
getin interfaceOptimizedFilePredicate- Overrides:
getin classAbstractFilePredicate
-
priority
public int priority()
Description copied from interface:OptimizedFilePredicateFor optimization. FilePredicates will be applied in priority order. For example when doing p.and(p1, p2, p3) then p1, p2 and p3 will be applied according to their priority value. Higher priority value are applied first. Assign a high priority when the predicate will likely highly reduce the set of InputFiles to filter. AlsoRelativePathPredicateand AbsolutePathPredicate have a high priority since they are using cache index.- Specified by:
priorityin interfaceOptimizedFilePredicate- Overrides:
priorityin classAbstractFilePredicate
-
-