public class VersionRangeMatcher extends AbstractVersionMatcher
Constructor and Description |
---|
VersionRangeMatcher() |
VersionRangeMatcher(java.lang.String name) |
VersionRangeMatcher(java.lang.String name,
LatestStrategy strategy) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(ModuleRevisionId askedMrid,
ModuleRevisionId foundMrid)
Indicates if this version matcher considers that the module revision found matches the asked
one.
|
int |
compare(ModuleRevisionId askedMrid,
ModuleRevisionId foundMrid,
java.util.Comparator staticComparator)
This method should be overriden in most cases, because it uses the default contract to return
1 when it's not possible to know which revision is greater.
|
LatestStrategy |
getLatestStrategy() |
boolean |
isDynamic(ModuleRevisionId askedMrid)
Indicates if the given asked ModuleRevisionId should be considered as dynamic for the current
VersionMatcher or not.
|
void |
setLatest(java.lang.String latestStrategyName) |
void |
setLatestStrategy(LatestStrategy latestStrategy) |
accept, getName, getSettings, needModuleDescriptor, setName, setSettings, toString
public VersionRangeMatcher()
public VersionRangeMatcher(java.lang.String name)
public VersionRangeMatcher(java.lang.String name, LatestStrategy strategy)
public boolean isDynamic(ModuleRevisionId askedMrid)
VersionMatcher
askedMrid
- the dependency module revision id as asked by a modulepublic boolean accept(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid)
VersionMatcher
public int compare(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid, java.util.Comparator staticComparator)
AbstractVersionMatcher
compare
in interface VersionMatcher
compare
in class AbstractVersionMatcher
askedMrid
- the dynamic revision to comparefoundMrid
- the static revision to comparestaticComparator
- a comparator which can be used to compare static revisionspublic LatestStrategy getLatestStrategy()
public void setLatestStrategy(LatestStrategy latestStrategy)
public void setLatest(java.lang.String latestStrategyName)