Package org.opensearch.client.transport
Class Version
- java.lang.Object
-
- org.opensearch.client.transport.Version
-
public class Version extends java.lang.ObjectThis class represents a SemVer version, with an optional patch revision.
-
-
Constructor Summary
Constructors Constructor Description Version(int major, int minor, int maintenance, boolean isPreRelease)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)inthashCode()booleanisPreRelease()intmaintenance()intmajor()intminor()static Versionparse(java.lang.String version)Parse a version string formatted using the standard Maven version format.java.lang.StringtoString()
-
-
-
Field Detail
-
VERSION
@Nullable public static final Version VERSION
This library's version, read from the classpath. Can benullif the version resource could not be read.
-
-
Method Detail
-
parse
public static Version parse(java.lang.String version)
Parse a version string formatted using the standard Maven version format.- Returns:
- the version, or
nullif 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-