Package org.apache.ivy.plugins.latest
Class ComparatorLatestStrategy
java.lang.Object
org.apache.ivy.plugins.latest.AbstractLatestStrategy
org.apache.ivy.plugins.latest.ComparatorLatestStrategy
- All Implemented Interfaces:
LatestStrategy
- Direct Known Subclasses:
LatestLexicographicStrategy
,LatestRevisionStrategy
,LatestTimeStrategy
,OsgiLatestStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setComparator
(Comparator<ArtifactInfo> comparator) sort
(ArtifactInfo[] infos) Sorts the given artifacts info from the oldest one to the latest one.Methods inherited from class org.apache.ivy.plugins.latest.AbstractLatestStrategy
findLatest, getName, setName, toString
-
Constructor Details
-
ComparatorLatestStrategy
public ComparatorLatestStrategy() -
ComparatorLatestStrategy
-
-
Method Details
-
sort
Description copied from interface:LatestStrategy
Sorts the given artifacts info from the oldest one to the latest one. The definition of 'latest' depends on the strategy itself. Given artifacts info are all good candidate.- Parameters:
infos
- ArtifactInfo[]- Returns:
- List<ArtifactInfo>
-
getComparator
-
setComparator
-