CVersionStandardType, CVersionType, java.lang.Comparable<CVersionType>public final class CVersionStandard extends java.lang.Object implements CVersionStandardType
The type of standard version numbers of the form M.N.P-S,
where M is the major version, N is the minor
version, P is the patch number, and S is an
arbitrary qualifier string.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
CVersionStandard.Builder |
Builds instances of type
CVersionStandard. |
| Modifier and Type | Method | Description |
|---|---|---|
static CVersionStandard.Builder |
builder() |
Creates a builder for
CVersionStandard. |
static CVersionStandard |
copyOf(CVersionStandardType instance) |
Creates an immutable copy of a
CVersionStandardType value. |
boolean |
equals(java.lang.Object another) |
This instance is equal to all instances of
CVersionStandard that have equal attribute values. |
int |
hashCode() |
Computes a hash code from attributes:
major, minor, patch, qualifier. |
int |
major() |
|
int |
minor() |
|
static CVersionStandard |
of(int major,
int minor,
int patch,
java.lang.String qualifier) |
Construct a new immutable
CVersionStandard instance. |
int |
patch() |
|
java.lang.String |
qualifier() |
|
java.lang.String |
toString() |
Prints the immutable value
CVersionStandard with attribute values. |
CVersionStandard |
withMajor(int value) |
Copy the current immutable object by setting a value for the
major attribute. |
CVersionStandard |
withMinor(int value) |
Copy the current immutable object by setting a value for the
minor attribute. |
CVersionStandard |
withPatch(int value) |
Copy the current immutable object by setting a value for the
patch attribute. |
CVersionStandard |
withQualifier(java.lang.String value) |
Copy the current immutable object by setting a value for the
qualifier attribute. |
checkPreconditions, compareTo, toVersionString, versionAcceptpublic int major()
major in interface CVersionStandardTypepublic int minor()
minor in interface CVersionStandardTypepublic int patch()
patch in interface CVersionStandardTypepublic java.lang.String qualifier()
qualifier in interface CVersionStandardTypepublic final CVersionStandard withMajor(int value)
major attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for majorthis objectpublic final CVersionStandard withMinor(int value)
minor attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for minorthis objectpublic final CVersionStandard withPatch(int value)
patch attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for patchthis objectpublic final CVersionStandard withQualifier(java.lang.String value)
qualifier attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for qualifierthis objectpublic boolean equals(java.lang.Object another)
CVersionStandard that have equal attribute values.equals in class java.lang.Objecttrue if this is equal to another instancepublic int hashCode()
major, minor, patch, qualifier.hashCode in class java.lang.Objectpublic java.lang.String toString()
CVersionStandard with attribute values.toString in class java.lang.Objectpublic static CVersionStandard of(int major, int minor, int patch, java.lang.String qualifier)
CVersionStandard instance.major - The value for the major attributeminor - The value for the minor attributepatch - The value for the patch attributequalifier - The value for the qualifier attributepublic static CVersionStandard copyOf(CVersionStandardType instance)
CVersionStandardType value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static CVersionStandard.Builder builder()
CVersionStandard.Copyright © 2017 <code@io7m.com> http://io7m.com