KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > jayasoft > ivy > LatestStrategy


1 /*
2  * This file is subject to the license found in LICENCE.TXT in the root directory of the project.
3  *
4  * #SNAPSHOT#
5  */

6 package fr.jayasoft.ivy;
7
8 import java.util.Date JavaDoc;
9 import java.util.List JavaDoc;
10
11
12 public interface LatestStrategy {
13     /**
14      * Finds the latest artifact among the given artifacts info.
15      * The definition of 'latest' depends on the strategy itself.
16      * Given artifacts info are all good candidate. If the given date is not
17      * null, then found artifact should not be later than this date.
18      *
19      * @param infos
20      * @param date
21      * @return the latest artifact among the given ones.
22      */

23     ArtifactInfo findLatest(ArtifactInfo[] infos, Date JavaDoc date);
24     /**
25      * Sorts the given artifacts info from the latest one to the oldest one.
26      * The definition of 'latest' depends on the strategy itself.
27      * Given artifacts info are all good candidate.
28      * @param infos
29      * @return
30      */

31     List JavaDoc sort(ArtifactInfo[] infos);
32     String JavaDoc getName();
33 }
34
Popular Tags