Class AbstractLatestStrategy

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String name  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ArtifactInfo findLatest​(ArtifactInfo[] infos, java.util.Date date)
      Finds the latest artifact among the given artifacts info.
      java.lang.String getName()  
      void setName​(java.lang.String name)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        private java.lang.String name
    • Constructor Detail

      • AbstractLatestStrategy

        public AbstractLatestStrategy()
    • Method Detail

      • setName

        public void setName​(java.lang.String name)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • findLatest

        public ArtifactInfo findLatest​(ArtifactInfo[] infos,
                                       java.util.Date date)
        Description copied from interface: LatestStrategy
        Finds 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:
        findLatest in interface LatestStrategy
        Parameters:
        infos - ArtifactInfo[]
        date - Date
        Returns:
        the latest artifact among the given ones.