public class Version extends Object implements Comparable<Version>, Serializable
| Constructor and Description |
|---|
Version(String v)
版本对象,格式:tok+ ( '-' tok+)?
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Version that) |
boolean |
equals(Object ob) |
int |
hashCode() |
static Version |
of(String v)
解析版本字符串为Version对象
|
String |
toString() |
public Version(String v)
v - 版本字符串public static Version of(String v)
v - 版本字符串VersionIllegalArgumentException - 如果 v 为 null或 ""或无法解析的字符串,抛出此异常public int compareTo(Version that)
compareTo in interface Comparable<Version>Copyright © 2025. All rights reserved.