Package org.eclipse.aether.util.version
Class GenericVersion
java.lang.Object
org.eclipse.aether.util.version.GenericVersion
- All Implemented Interfaces:
Comparable<Version>,Version
A generic version, that is a version that accepts any input string and tries to apply common sense sorting. See
GenericVersionScheme for details.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class(package private) static final class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGenericVersion(String version) Creates a generic version from the specified string. -
Method Summary
Modifier and TypeMethodDescriptionasItems()Returns this instance tokenized representation as unmodifiable list.asString()Returns this instance backing string representation.private static intcomparePadding(List<GenericVersion.Item> items, int index, Boolean number) intbooleaninthashCode()private static List<GenericVersion.Item> toString()Gets the original string representation of the version.private static voidtrimPadding(List<GenericVersion.Item> items)
-
Field Details
-
version
-
items
-
hash
private final int hash
-
-
Constructor Details
-
GenericVersion
GenericVersion(String version) Creates a generic version from the specified string.- Parameters:
version- The version string, must not benull.
-
-
Method Details
-
asString
Returns this instance backing string representation.- Since:
- 1.9.5
-
asItems
Returns this instance tokenized representation as unmodifiable list.- Since:
- 1.9.5
-
parse
-
trimPadding
-
compareTo
- Specified by:
compareToin interfaceComparable<Version>
-
comparePadding
-
equals
-
hashCode
public int hashCode() -
toString
Description copied from interface:VersionGets the original string representation of the version.
-