public class Version extends Object
| Constructor and Description |
|---|
Version(int major,
int minor,
int revision) |
| Modifier and Type | Method and Description |
|---|---|
static Version |
fromString(String s)
Creates a version from a String that matches
PATTERN; major, minor and revision numbers separated by dots
with optional trailing characters. |
int |
getMajor() |
int |
getMinor() |
int |
getRevision() |
String |
toString() |
public static Version fromString(String s)
PATTERN; major, minor and revision numbers separated by dots
with optional trailing characters. A missing revision is treated as 0.s - the String to parseIllegalArgumentException - if the input is null or cannot be parsed.public int getMajor()
public int getMinor()
public int getRevision()
Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.