Package co.elastic.clients.transport
Class Version
java.lang.Object
co.elastic.clients.transport.Version
public class Version
extends java.lang.Object
This class represents a SemVer version, with an optional patch revision.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Version(int major, int minor, int maintenance, boolean isPreRelease)
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object other)
int
hashCode()
boolean
isPreRelease()
int
maintenance()
int
major()
int
minor()
static Version
parse(java.lang.String version)
Parse a version string formatted using the standard Maven version format.java.lang.String
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
VERSION
This library's version, read from the classpath. Can benull
if the version resource could not be read.
-
-
Constructor Details
-
Version
public Version(int major, int minor, int maintenance, boolean isPreRelease)
-
-
Method Details
-
parse
Parse a version string formatted using the standard Maven version format.- Returns:
- the version, or
null
if the version could not be parsed.
-
major
public int major() -
minor
public int minor() -
maintenance
public int maintenance() -
isPreRelease
public boolean isPreRelease() -
equals
public boolean equals(java.lang.Object other)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-