public abstract class AbstractVersionDetails extends Object implements VersionDetails
VersionDetails.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractVersionDetails() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsVersion(String version)
Returns
true if the specific version is in the list of versions. |
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getAllUpdates()
Returns the all versions newer than the specified current version
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getAllUpdates(org.apache.maven.artifact.versioning.ArtifactVersion currentVersion,
Optional<Segment> updateScope,
boolean includeSnapshots)
Returns the all versions newer than the specified current version, but within the specified update scope.
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getAllUpdates(Optional<Segment> updateScope)
Returns the all versions newer than the specified current version, but within the specified update scope.
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getAllUpdates(Optional<Segment> updateScope,
boolean includeSnapshots)
Returns the all versions newer than the specified current version, but within the specified update scope.
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getAllUpdates(org.apache.maven.artifact.versioning.VersionRange versionRange)
Returns the all versions newer than the specified current version, but within the specified update scope.
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getAllUpdates(org.apache.maven.artifact.versioning.VersionRange versionRange,
boolean includeSnapshots)
Returns the all versions newer than the specified current version, but within the specified update scope.
|
org.apache.maven.artifact.versioning.ArtifactVersion |
getCurrentVersion()
Retrieves the current version.
|
protected Optional<String> |
getLowerBound(org.apache.maven.artifact.versioning.ArtifactVersion version,
Optional<Segment> unchangedSegment)
Returns the string designation of the lower bound version based on the given artifact version
and the lowest unchanged segment index (0-based); -1 means that the whole version string can be changed,
implying that there is also no string designation of the lower bound version.
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getNewerVersions(String version,
boolean includeSnapshots)
Returns an array of newer versions than the given version, given whether snapshots
should be included.
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getNewerVersions(String version,
Optional<Segment> upperBoundSegment,
boolean includeSnapshots)
Deprecated.
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getNewerVersions(String versionString,
Optional<Segment> unchangedSegment,
boolean includeSnapshots,
boolean allowDowngrade)
Returns an array of newer versions than the given version, given the upper bound segment and whether snapshots
should be included.
|
org.apache.maven.artifact.versioning.ArtifactVersion |
getNewestUpdate(org.apache.maven.artifact.versioning.ArtifactVersion currentVersion,
Optional<Segment> updateScope,
boolean includeSnapshots)
Returns the newest version newer than the specified current version, but within the specified update scope or
null if no such version exists. |
org.apache.maven.artifact.versioning.ArtifactVersion |
getNewestUpdate(Optional<Segment> updateScope)
Returns the newest version newer than the specified current version, but within the specified update scope or
null if no such version exists. |
org.apache.maven.artifact.versioning.ArtifactVersion |
getNewestUpdate(Optional<Segment> updateScope,
boolean includeSnapshots)
Returns the newest version newer than the specified current version, but within the specified update scope or
null if no such version exists. |
org.apache.maven.artifact.versioning.ArtifactVersion |
getNewestVersion(org.apache.maven.artifact.versioning.ArtifactVersion lowerBound,
org.apache.maven.artifact.versioning.ArtifactVersion upperBound)
Returns the latest version newer than the specified lowerBound, but less than the specified upper bound or
null if no such version exists. |
org.apache.maven.artifact.versioning.ArtifactVersion |
getNewestVersion(org.apache.maven.artifact.versioning.ArtifactVersion lowerBound,
org.apache.maven.artifact.versioning.ArtifactVersion upperBound,
boolean includeSnapshots)
Returns the latest version newer than the specified lowerBound, but less than the specified upper bound or
null if no such version exists. |
org.apache.maven.artifact.versioning.ArtifactVersion |
getNewestVersion(org.apache.maven.artifact.versioning.Restriction restriction,
boolean includeSnapshots)
Returns the latest version newer than the specified current version, but less than the specified upper bound or
null if no such version exists. |
org.apache.maven.artifact.versioning.ArtifactVersion |
getNewestVersion(org.apache.maven.artifact.versioning.VersionRange versionRange,
boolean includeSnapshots)
Returns the latest version within the specified version range or
null if no such version exists. |
org.apache.maven.artifact.versioning.ArtifactVersion |
getNewestVersion(org.apache.maven.artifact.versioning.VersionRange versionRange,
org.apache.maven.artifact.versioning.Restriction restriction,
boolean includeSnapshots)
Returns the latest version newer than the specified current version, but less than the specified upper bound or
null if no such version exists. |
org.apache.maven.artifact.versioning.ArtifactVersion |
getNewestVersion(org.apache.maven.artifact.versioning.VersionRange versionRange,
org.apache.maven.artifact.versioning.Restriction restriction,
boolean includeSnapshots,
boolean allowDowngrade)
Returns the latest version given the version range, restricition, whether to include snapshots and/or
allow downgrades, or
null if no such version exists. |
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getVersions()
Returns all the available versions in increasing order.
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getVersions(org.apache.maven.artifact.versioning.ArtifactVersion lowerBound,
org.apache.maven.artifact.versioning.ArtifactVersion upperBound)
Returns all available versions within the specified bounds.
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getVersions(org.apache.maven.artifact.versioning.ArtifactVersion lowerBound,
org.apache.maven.artifact.versioning.ArtifactVersion upperBound,
boolean includeSnapshots)
Returns all available versions within the specified bounds.
|
abstract org.apache.maven.artifact.versioning.ArtifactVersion[] |
getVersions(boolean includeSnapshots)
Returns all available versions in increasing order.
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getVersions(org.apache.maven.artifact.versioning.Restriction restriction,
boolean includeSnapshots)
Returns all available versions within the specified bounds.
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getVersions(org.apache.maven.artifact.versioning.VersionRange versionRange,
boolean includeSnapshots)
Returns all available versions within the specified version range.
|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
getVersions(org.apache.maven.artifact.versioning.VersionRange versionRange,
org.apache.maven.artifact.versioning.Restriction restriction,
boolean includeSnapshots)
Returns all available versions within the specified bounds.
|
boolean |
isCurrentVersionDefined()
Returns
true if and only if getCurrentVersion() != null. |
boolean |
isIncludeSnapshots() |
void |
setCurrentVersion(org.apache.maven.artifact.versioning.ArtifactVersion currentVersion)
Sets the current version.
|
void |
setCurrentVersion(String currentVersion)
Sets the current version.
|
void |
setIncludeSnapshots(boolean includeSnapshots) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetVersionComparatorpublic final boolean isCurrentVersionDefined()
VersionDetailstrue if and only if getCurrentVersion() != null.isCurrentVersionDefined in interface VersionDetailstrue if and only if getCurrentVersion() != null.public final org.apache.maven.artifact.versioning.ArtifactVersion getCurrentVersion()
VersionDetailsgetCurrentVersion in interface VersionDetailsnull).public final void setCurrentVersion(org.apache.maven.artifact.versioning.ArtifactVersion currentVersion)
VersionDetailssetCurrentVersion in interface VersionDetailscurrentVersion - The new current version.public final void setCurrentVersion(String currentVersion)
VersionDetailssetCurrentVersion in interface VersionDetailscurrentVersion - The new current version.public final boolean isIncludeSnapshots()
isIncludeSnapshots in interface VersionDetailspublic final void setIncludeSnapshots(boolean includeSnapshots)
setIncludeSnapshots in interface VersionDetailspublic final org.apache.maven.artifact.versioning.ArtifactVersion[] getVersions()
VersionDetailsgetVersions in interface VersionDetailspublic abstract org.apache.maven.artifact.versioning.ArtifactVersion[] getVersions(boolean includeSnapshots)
VersionDetailsgetVersions in interface VersionDetailsincludeSnapshots - true if snapshots are to be included.public final org.apache.maven.artifact.versioning.ArtifactVersion[] getVersions(org.apache.maven.artifact.versioning.VersionRange versionRange,
boolean includeSnapshots)
VersionDetailsgetVersions in interface VersionDetailsversionRange - The version range within which the version must exist.includeSnapshots - true if snapshots are to be included.public final org.apache.maven.artifact.versioning.ArtifactVersion[] getVersions(org.apache.maven.artifact.versioning.ArtifactVersion lowerBound,
org.apache.maven.artifact.versioning.ArtifactVersion upperBound)
VersionDetailsgetVersions in interface VersionDetailslowerBound - the lower bound or null if the lower limit is unbounded.upperBound - the upper bound or null if the upper limit is unbounded.public final org.apache.maven.artifact.versioning.ArtifactVersion[] getVersions(org.apache.maven.artifact.versioning.ArtifactVersion lowerBound,
org.apache.maven.artifact.versioning.ArtifactVersion upperBound,
boolean includeSnapshots)
VersionDetailsgetVersions in interface VersionDetailslowerBound - the lower bound or null if the lower limit is unbounded.upperBound - the upper bound or null if the upper limit is unbounded.includeSnapshots - true if snapshots are to be included.public final org.apache.maven.artifact.versioning.ArtifactVersion getNewestVersion(org.apache.maven.artifact.versioning.ArtifactVersion lowerBound,
org.apache.maven.artifact.versioning.ArtifactVersion upperBound)
VersionDetailsnull if no such version exists.getNewestVersion in interface VersionDetailslowerBound - the lower bound or null if the lower limit is unbounded.upperBound - the upper bound or null if the upper limit is unbounded.null if no version is available.public final org.apache.maven.artifact.versioning.ArtifactVersion getNewestVersion(org.apache.maven.artifact.versioning.ArtifactVersion lowerBound,
org.apache.maven.artifact.versioning.ArtifactVersion upperBound,
boolean includeSnapshots)
VersionDetailsnull if no such version exists.getNewestVersion in interface VersionDetailslowerBound - the lower bound or null if the lower limit is unbounded.upperBound - the upper bound or null if the upper limit is unbounded.includeSnapshots - true if snapshots are to be included.null if no version is available.public final org.apache.maven.artifact.versioning.ArtifactVersion getNewestVersion(org.apache.maven.artifact.versioning.VersionRange versionRange,
org.apache.maven.artifact.versioning.Restriction restriction,
boolean includeSnapshots)
VersionDetailsnull if no such version exists.getNewestVersion in interface VersionDetailsversionRange - The version range within which the version must exist where null imples
[,).restriction - version criteria.includeSnapshots - true if snapshots are to be included.null if no version is available.public final org.apache.maven.artifact.versioning.ArtifactVersion getNewestVersion(org.apache.maven.artifact.versioning.VersionRange versionRange,
org.apache.maven.artifact.versioning.Restriction restriction,
boolean includeSnapshots,
boolean allowDowngrade)
VersionDetailsnull if no such version exists.getNewestVersion in interface VersionDetailsversionRange - range to look for the versionsrestriction - restriction restricting the version lookupincludeSnapshots - true if snapshots are to be included.allowDowngrade - whether downgrades are allowednull if no version is available.public final org.apache.maven.artifact.versioning.ArtifactVersion getNewestVersion(org.apache.maven.artifact.versioning.Restriction restriction,
boolean includeSnapshots)
VersionDetailsnull if no such version exists.getNewestVersion in interface VersionDetailsrestriction - version criteria.includeSnapshots - true if snapshots are to be included.null if no version is available.public final org.apache.maven.artifact.versioning.ArtifactVersion getNewestVersion(org.apache.maven.artifact.versioning.VersionRange versionRange,
boolean includeSnapshots)
VersionDetailsnull if no such version exists.getNewestVersion in interface VersionDetailsversionRange - The version range within which the version must exist.includeSnapshots - true if snapshots are to be included.null if no version is available.public final boolean containsVersion(String version)
VersionDetailstrue if the specific version is in the list of versions.containsVersion in interface VersionDetailsversion - the specific version.true if the specific version is in the list of versions.public final org.apache.maven.artifact.versioning.ArtifactVersion[] getNewerVersions(String version, boolean includeSnapshots)
VersionDetailsgetNewerVersions in interface VersionDetailsversion - current version in String formatincludeSnapshots - whether snapshot versions should be included@Deprecated public final org.apache.maven.artifact.versioning.ArtifactVersion[] getNewerVersions(String version, Optional<Segment> upperBoundSegment, boolean includeSnapshots) throws InvalidSegmentException
VersionDetailsgetNewerVersions in interface VersionDetailsversion - current versionupperBoundSegment - the upper bound segment; empty() means no upper boundincludeSnapshots - whether snapshot versions should be includedInvalidSegmentException - if the requested segment is outside the bounds (less than 1 or greater than
the segment count)public final org.apache.maven.artifact.versioning.ArtifactVersion[] getNewerVersions(String versionString, Optional<Segment> unchangedSegment, boolean includeSnapshots, boolean allowDowngrade) throws InvalidSegmentException
VersionDetailsgetNewerVersions in interface VersionDetailsversionString - current versionunchangedSegment - the upper bound segment; empty() means no upper boundincludeSnapshots - whether snapshot versions should be includedallowDowngrade - whether to allow downgrading if the current version is a snapshots and snapshots
are disallowedInvalidSegmentException - if the requested segment is outside the bounds (less than 1 or greater than
the segment count)public final org.apache.maven.artifact.versioning.ArtifactVersion[] getVersions(org.apache.maven.artifact.versioning.Restriction restriction,
boolean includeSnapshots)
VersionDetailsgetVersions in interface VersionDetailsrestriction - version criteria.includeSnapshots - true if snapshots are to be included.public final org.apache.maven.artifact.versioning.ArtifactVersion[] getVersions(org.apache.maven.artifact.versioning.VersionRange versionRange,
org.apache.maven.artifact.versioning.Restriction restriction,
boolean includeSnapshots)
VersionDetailsgetVersions in interface VersionDetailsversionRange - The version range within which the version must exist where null imples
[,).restriction - version criteria.includeSnapshots - true if snapshots are to be included.public final org.apache.maven.artifact.versioning.ArtifactVersion getNewestUpdate(org.apache.maven.artifact.versioning.ArtifactVersion currentVersion,
Optional<Segment> updateScope,
boolean includeSnapshots)
VersionDetailsnull if no such version exists.getNewestUpdate in interface VersionDetailscurrentVersion - the lower bound or null if the lower limit is unbounded.updateScope - the update scope to include.includeSnapshots - true if snapshots are to be included.null if no
version is available.public final org.apache.maven.artifact.versioning.ArtifactVersion[] getAllUpdates(org.apache.maven.artifact.versioning.ArtifactVersion currentVersion,
Optional<Segment> updateScope,
boolean includeSnapshots)
VersionDetailsgetAllUpdates in interface VersionDetailscurrentVersion - the lower bound or null if the lower limit is unbounded.updateScope - the update scope to include.includeSnapshots - true if snapshots are to be included.public final org.apache.maven.artifact.versioning.ArtifactVersion getNewestUpdate(Optional<Segment> updateScope)
VersionDetailsnull if no such version exists.getNewestUpdate in interface VersionDetailsupdateScope - the update scope to include.null if no
version is available.public final org.apache.maven.artifact.versioning.ArtifactVersion[] getAllUpdates(Optional<Segment> updateScope)
VersionDetailsgetAllUpdates in interface VersionDetailsupdateScope - the update scope to include.public final org.apache.maven.artifact.versioning.ArtifactVersion getNewestUpdate(Optional<Segment> updateScope, boolean includeSnapshots)
VersionDetailsnull if no such version exists.getNewestUpdate in interface VersionDetailsupdateScope - the update scope to include.includeSnapshots - true if snapshots are to be included.null if no
version is available.public final org.apache.maven.artifact.versioning.ArtifactVersion[] getAllUpdates(Optional<Segment> updateScope, boolean includeSnapshots)
VersionDetailsgetAllUpdates in interface VersionDetailsupdateScope - the update scope to include.includeSnapshots - true if snapshots are to be included.public final org.apache.maven.artifact.versioning.ArtifactVersion[] getAllUpdates()
VersionDetailsgetAllUpdates in interface VersionDetailspublic final org.apache.maven.artifact.versioning.ArtifactVersion[] getAllUpdates(org.apache.maven.artifact.versioning.VersionRange versionRange)
VersionDetailsgetAllUpdates in interface VersionDetailsversionRange - the version range to include.public org.apache.maven.artifact.versioning.ArtifactVersion[] getAllUpdates(org.apache.maven.artifact.versioning.VersionRange versionRange,
boolean includeSnapshots)
VersionDetailsgetAllUpdates in interface VersionDetailsversionRange - the version range to include.includeSnapshots - true if snapshots are to be included.protected Optional<String> getLowerBound(org.apache.maven.artifact.versioning.ArtifactVersion version, Optional<Segment> unchangedSegment) throws InvalidSegmentException
version - ArtifactVersion object specifying the version for which the lower bound is being computedunchangedSegment - first segment not to be changed; empty() means anything can changeOptional string containing the lowest artifact version with the given segment heldInvalidSegmentException - if the requested segment is outside of the bounds (less than 1 or greater than
the segment count)Copyright © 2008–2022 MojoHaus. All rights reserved.