Package aQute.bnd.version
Class MavenVersion
java.lang.Object
aQute.bnd.version.MavenVersion
- All Implemented Interfaces:
Comparable<MavenVersion>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ComparableVersionprivate static final Patternprivate static final Patternstatic final MavenVersionstatic final MavenVersionprivate static final DateTimeFormatterprivate static final Stringstatic final MavenVersionprivate final Versionprivate static final Patternprivate static final Stringprivate static final Patternprivate static final MavenVersion -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidcleanupModifier(StringBuilder result, String modifier) static StringcleanupVersion(String version) intcompareTo(MavenVersion other) booleaninthashCode()private static booleanThe cleanup version got confused when people used numeric dates like 201209091230120 as qualifiers.booleanIf the qualifier ends with -SNAPSHOT or for an OSGI version with a qualifier that is SNAPSHOTstatic final MavenVersionparseMavenString(String versionStr) static final MavenVersionparseString(String osgiVersionStr) This parses an OSGi Version string into a MavenVersion which is not very interesting.private static StringremoveLeadingZeroes(String group) static StringtoDateStamp(long epoch) static StringtoDateStamp(long epoch, String build) Return the plain release version for this Maven Version.toSnapshot(long epoch, String build) toSnapshot(String dateStamp) toSnapshot(String timestamp, String build) toString()static String
-
Field Details
-
fuzzyVersion
-
fuzzyVersionRange
-
VERSION_STRING
- See Also:
-
VERSION
-
VERSIONRANGE
-
MAVEN_SNAPSHOT_DATE_TIME
-
UNRESOLVED
-
SNAPSHOT
- See Also:
-
HIGHEST
-
LOWEST
-
ZERO
-
version
-
comparable
-
-
Constructor Details
-
MavenVersion
-
MavenVersion
-
-
Method Details
-
parseString
This parses an OSGi Version string into a MavenVersion which is not very interesting. You probably wantparseMavenString(String). -
parseMavenString
-
getOSGiVersion
-
isSnapshot
public boolean isSnapshot()If the qualifier ends with -SNAPSHOT or for an OSGI version with a qualifier that is SNAPSHOT -
compareTo
- Specified by:
compareToin interfaceComparable<MavenVersion>
-
toString
-
hashCode
public int hashCode() -
equals
-
toSnapshot
-
toReleaseVersion
Return the plain release version for this Maven Version.The release version contains no alpha characters.
- Returns:
- The plain release version for this Maven Version.
-
validate
-
toDateStamp
-
toDateStamp
-
toSnapshot
-
toSnapshot
-
toSnapshot
-
cleanupVersion
-
isInteger
The cleanup version got confused when people used numeric dates like 201209091230120 as qualifiers. These are too large for Integers. This method checks if the all digit string fits in an integer.maxint = 2,147,483,647 = 10 digits
- Returns:
- if this fits in an integer
-
removeLeadingZeroes
-
cleanupModifier
-