java.lang.Object
springfox.documentation.swagger.common.Version
所有已实现的接口:
Comparable<Version>

public class Version extends Object implements Comparable<Version>
Value object to represent a Version consisting of major, minor and bugfix part.
作者:
Oliver Gierke
  • 构造器详细资料

    • Version

      public Version(int... parts)
      Creates a new Version from the given integer values. At least one value has to be given but a maximum of 4.
      参数:
      parts - must not be null or empty.
  • 方法详细资料

    • parse

      public static Version parse(String version)
      Parses the given string representation of a version into a Version object.
      参数:
      version - must not be null or empty.
      返回:
      returns version
    • isGreaterThan

      public boolean isGreaterThan(Version version)
      Returns whether the current Version is greater (newer) than the given one.
      参数:
      version - - candidate version
      返回:
      true or false based on version comparison
    • isGreaterThanOrEqualTo

      public boolean isGreaterThanOrEqualTo(Version version)
      Returns whether the current Version is greater (newer) or the same as the given one.
      参数:
      version - - candidate version
      返回:
      true or false based on version comparison
    • is

      public boolean is(Version version)
      Returns whether the current Version is the same as the given one.
      参数:
      version - - candidate version
      返回:
      true or false based on version comparison
    • isLessThan

      public boolean isLessThan(Version version)
      Returns whether the current Version is less (older) than the given one.
      参数:
      version - - candidate version
      返回:
      true or false based on version comparison
    • isLessThanOrEqualTo

      public boolean isLessThanOrEqualTo(Version version)
      Returns whether the current Version is less (older) or equal to the current one.
      参数:
      version - - candidate version
      返回:
      true or false based on version comparison
    • compareTo

      public int compareTo(Version that)
      指定者:
      compareTo 在接口中 Comparable<Version>
    • equals

      public boolean equals(Object obj)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object