public abstract class AbstractVersionMatcher extends java.lang.Object implements VersionMatcher, IvySettingsAware
Constructor and Description |
---|
AbstractVersionMatcher() |
AbstractVersionMatcher(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(ModuleRevisionId askedMrid,
ModuleDescriptor foundMD)
Indicates if this version matcher considers that the module 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.
|
java.lang.String |
getName()
Returns the version matcher name identifying this version matcher
|
IvySettings |
getSettings() |
boolean |
needModuleDescriptor(ModuleRevisionId askedMrid,
ModuleRevisionId foundMrid)
Indicates if this VersionMatcher needs module descriptors to determine if a module revision
matches the asked one.
|
void |
setName(java.lang.String name) |
void |
setSettings(IvySettings settings) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accept, isDynamic
public AbstractVersionMatcher()
public AbstractVersionMatcher(java.lang.String name)
public java.lang.String getName()
VersionMatcher
getName
in interface VersionMatcher
public void setName(java.lang.String name)
public boolean needModuleDescriptor(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid)
VersionMatcher
needModuleDescriptor
in interface VersionMatcher
public boolean accept(ModuleRevisionId askedMrid, ModuleDescriptor foundMD)
VersionMatcher
accept
in interface VersionMatcher
public int compare(ModuleRevisionId askedMrid, ModuleRevisionId foundMrid, java.util.Comparator staticComparator)
compare
in interface VersionMatcher
askedMrid
- the dynamic revision to comparefoundMrid
- the static revision to comparestaticComparator
- a comparator which can be used to compare static revisionspublic java.lang.String toString()
toString
in class java.lang.Object
public IvySettings getSettings()
public void setSettings(IvySettings settings)
setSettings
in interface IvySettingsAware