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

    Fields
    Modifier and Type Field Description
    static Version VERSION
    This library's version, read from the classpath.
  • 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

      @Nullable public static final Version VERSION
      This library's version, read from the classpath. Can be null if the version resource could not be read.
  • Constructor Details

    • Version

      public Version​(int major, int minor, int maintenance, boolean isPreRelease)
  • Method Details

    • parse

      public static Version parse​(java.lang.String version)
      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 class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object