net.sf.taverna.raven.spi
Class LatestVersionFilter

java.lang.Object
  extended by net.sf.taverna.raven.spi.AbstractArtifactFilter
      extended by net.sf.taverna.raven.spi.LatestVersionFilter
All Implemented Interfaces:
ArtifactFilter

public class LatestVersionFilter
extends AbstractArtifactFilter

Filters the set of artifacts, removing all but the latest version of each groupId,artifactId pair. Version numbers are sorted as in VersionComparator.

Author:
Tom Oinn, Stian Soiland-Reyes
See Also:
VersionComparator

Constructor Summary
LatestVersionFilter()
           
 
Method Summary
 java.util.Set<Artifact> filter(java.util.Set<Artifact> artifacts)
          Given a set of Artifacts returns a subset according to the filtering criteria defined by implementations of this interface.
 
Methods inherited from class net.sf.taverna.raven.spi.AbstractArtifactFilter
addArtifactFilterListener, removeArtifactFilterListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LatestVersionFilter

public LatestVersionFilter()
Method Detail

filter

public java.util.Set<Artifact> filter(java.util.Set<Artifact> artifacts)
Description copied from interface: ArtifactFilter
Given a set of Artifacts returns a subset according to the filtering criteria defined by implementations of this interface.

Parameters:
artifacts - List of Artifacts to filter
Returns:
filtered subset of the input