Class GpgVersion

java.lang.Object
org.apache.maven.plugins.gpg.GpgVersion
All Implemented Interfaces:
Comparable<GpgVersion>

public class GpgVersion extends Object implements Comparable<GpgVersion>
Represents the semver value of GPG. This is in most cases the first line of gpg --version
Since:
3.0.0
Author:
Robert Scholte
  • Method Details

    • parse

      public static GpgVersion parse(String rawVersion)
    • compareTo

      public int compareTo(GpgVersion other)
      Specified by:
      compareTo in interface Comparable<GpgVersion>
    • isBefore

      public boolean isBefore(GpgVersion other)
      Verify if this version is before some other version
      Parameters:
      other - the version to compare with
      Returns:
      true is this is less than other, otherwise false
    • isAtLeast

      public boolean isAtLeast(GpgVersion other)
      Verify if this version is at least some other version
      Parameters:
      other - the version to compare with
      Returns:
      true is this is greater than or equal to other, otherwise false
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object