Package ca.solostudios.strata.version
Class PreRelease
- java.lang.Object
-
- ca.solostudios.strata.version.PreRelease
-
- All Implemented Interfaces:
Formattable,java.lang.Comparable<PreRelease>
public final class PreRelease extends java.lang.Object implements java.lang.Comparable<PreRelease>, Formattable
A class representing the pre-release data for aVersion.- See Also:
PreReleaseIdentifier
-
-
Field Summary
Fields Modifier and Type Field Description static PreReleaseNULLAn empty pre-release instance used it no pre-release is provided.
-
Constructor Summary
Constructors Constructor Description PreRelease(@NotNull java.util.List<PreReleaseIdentifier> identifiers)Constructs a new pre-release with the provided identifiers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(@NotNull PreRelease o)booleanequals(java.lang.Object o)@NotNull java.lang.StringgetFormatted()This object represented as a short and human readable string.java.util.List<PreReleaseIdentifier>getIdentifiers()The internal identifiersinthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
NULL
public static final PreRelease NULL
An empty pre-release instance used it no pre-release is provided.
-
-
Constructor Detail
-
PreRelease
public PreRelease(@NotNull @NotNull java.util.List<PreReleaseIdentifier> identifiers)Constructs a new pre-release with the provided identifiers.- Parameters:
identifiers- The identifiers for this pre-release.
-
-
Method Detail
-
compareTo
public int compareTo(@NotNull @NotNull PreRelease o)- Specified by:
compareToin interfacejava.lang.Comparable<PreRelease>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getIdentifiers
public java.util.List<PreReleaseIdentifier> getIdentifiers()
The internal identifiers- Returns:
- The internal identifies of this pre-release
-
getFormatted
@NotNull public @NotNull java.lang.String getFormatted()
Description copied from interface:FormattableThis object represented as a short and human readable string.- Specified by:
getFormattedin interfaceFormattable- Returns:
- This object as a readable string.
-
equals
@Contract(value="null -> false", pure=true) public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-