Package org.apache.ivy.plugins.latest
Class AbstractLatestStrategy
- java.lang.Object
-
- org.apache.ivy.plugins.latest.AbstractLatestStrategy
-
- All Implemented Interfaces:
LatestStrategy
- Direct Known Subclasses:
ComparatorLatestStrategy,WorkspaceLatestStrategy
public abstract class AbstractLatestStrategy extends java.lang.Object implements LatestStrategy
-
-
Constructor Summary
Constructors Constructor Description AbstractLatestStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactInfofindLatest(ArtifactInfo[] infos, java.util.Date date)Finds the latest artifact among the given artifacts info.java.lang.StringgetName()voidsetName(java.lang.String name)java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ivy.plugins.latest.LatestStrategy
sort
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceLatestStrategy
-
setName
public void setName(java.lang.String name)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
findLatest
public ArtifactInfo findLatest(ArtifactInfo[] infos, java.util.Date date)
Description copied from interface:LatestStrategyFinds the latest artifact among the given artifacts info. The definition of 'latest' depends on the strategy itself. Given artifacts info are all good candidate. If the given date is not null, then found artifact should not be later than this date.- Specified by:
findLatestin interfaceLatestStrategy- Parameters:
infos- ArtifactInfo[]date- Date- Returns:
- the latest artifact among the given ones.
-
-