Package dev.gigaherz.versible
Interface VersibleComponent
- All Superinterfaces:
Comparable<VersibleComponent>
- All Known Implementing Classes:
VersibleComponent.Alphabetic,VersibleComponent.Numeric,VersibleComponent.Suffix
Represents a component within a version string.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordRepresents an alphabetic component.static final recordRepresents a numeric component.static final recordA component that represents the start of a suffix tag. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic VersibleComponent.Numericof(long number) Returns a numeric component with the given number.static VersibleComponent.AlphabeticReturns an alphabetic component with the given string.static VersibleComponent.Suffixsuffix(boolean positive) Returns a suffix component for the corresponding positive/negative tag type.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
of
Returns a numeric component with the given number. The number must be positive or zero.- Parameters:
number- The number to use for the numeric component.- Returns:
- A numeric component with the corresponding number.
-
of
Returns an alphabetic component with the given string. The string must only contain letters.- Parameters:
word- The word to use for the alphabetic component- Returns:
- An alphabetic component with the corresponding word.
-
suffix
Returns a suffix component for the corresponding positive/negative tag type.- Parameters:
positive- Whether the tag type is positivetrueor negetivefalse.- Returns:
- A suffix component with the corresponding tag type.
-