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 int
comparePadding
(List<GenericVersion.Item> items, int index, Boolean number) int
boolean
int
hashCode()
private static List
<GenericVersion.Item> toString()
Gets the original string representation of the version.private static void
trimPadding
(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:
compareTo
in interfaceComparable<Version>
-
comparePadding
-
equals
-
hashCode
public int hashCode() -
toString
Description copied from interface:Version
Gets the original string representation of the version.
-