Class OverviewStats
java.lang.Object
org.codehaus.mojo.versions.reporting.OverviewStats
- Direct Known Subclasses:
PluginOverviewStats
Represents summary stats
- Author:
- Andrzej Jarmoniuk
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends OverviewStats,V extends AbstractVersionDetails>
TfromUpdates(Collection<V> updates, ArtifactVersionsCache cache, boolean allowSnapshots) Creates a OverviewStats instance based on the collection of version updates in the argumentintgetAny()intintgetMajor()intgetMinor()protected static <V extends AbstractVersionDetails>
org.apache.maven.artifact.versioning.ArtifactVersiongetNewestUpdate(ArtifactVersionsCache cache, V details, Optional<Segment> segment, boolean allowSnapshots) intvoidvoidvoidvoidvoid
-
Constructor Details
-
OverviewStats
public OverviewStats()
-
-
Method Details
-
fromUpdates
public static <T extends OverviewStats,V extends AbstractVersionDetails> T fromUpdates(Collection<V> updates, ArtifactVersionsCache cache, boolean allowSnapshots) Creates a OverviewStats instance based on the collection of version updates in the argument- Type Parameters:
T- subclass of OverviewStatsV- subclass of ArtifactVersions- Parameters:
updates- collection of all version updates, typically from AbstractUpdatesModel.getAllUpdates()cache- if not null, cache to retrieve the version information, initialised with theAbstractVersionDetails.getNewestUpdateWithinSegment(Optional, boolean)update informationallowSnapshots- whether snapshots should be included- Returns:
- instance of the OverviewStats
-
getNewestUpdate
protected static <V extends AbstractVersionDetails> org.apache.maven.artifact.versioning.ArtifactVersion getNewestUpdate(ArtifactVersionsCache cache, V details, Optional<Segment> segment, boolean allowSnapshots) -
getMajor
public int getMajor() -
incrementMajor
public void incrementMajor() -
getMinor
public int getMinor() -
incrementMinor
public void incrementMinor() -
getIncremental
public int getIncremental() -
incrementIncremental
public void incrementIncremental() -
getAny
public int getAny() -
incrementAny
public void incrementAny() -
getUpToDate
public int getUpToDate() -
incrementUpToDate
public void incrementUpToDate()
-