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
FieldsModifier and TypeFieldDescriptionprivate final int
private final GenericVersion.Item[]
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionGenericVersion
(String version) Creates a generic version from the specified string. -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
comparePadding
(GenericVersion.Item[] items, int index, Boolean number) int
boolean
int
hashCode()
private static 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
-
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.
-