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 PreRelease
NULL
An 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 int
compareTo(@NotNull PreRelease o)
boolean
equals(java.lang.Object o)
@NotNull java.lang.String
getFormatted()
This object represented as a short and human readable string.java.util.List<PreReleaseIdentifier>
getIdentifiers()
The internal identifiersint
hashCode()
java.lang.String
toString()
-
-
-
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:
compareTo
in interfacejava.lang.Comparable<PreRelease>
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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:Formattable
This object represented as a short and human readable string.- Specified by:
getFormatted
in interfaceFormattable
- Returns:
- This object as a readable string.
-
equals
@Contract(value="null -> false", pure=true) public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-