| Modifier and Type | Field and Description |
|---|---|
| private static final OSVersion | |
| private final int | |
| private final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | OSVersion(int
major version major, int minor version minor)Returns a Version for major, minor versions. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: Compare this version with another versionthe object to be compared other)Implements java. Returns Compare this version with another version. |
| public static OSVersion | |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| private static OSVersion | |
| public int | |
| public int | |
| public int | |
| public static OSVersion | |
| private static int | Returns: The index of the first non-digit from startReturns The index of the first non-digit from start. |
| public String | toString()
Implements abstract java. Returns a string representation of the record. |
| CURRENT_OSVERSION | back to summary |
|---|---|
| private static final OSVersion CURRENT_OSVERSION | |
| major | back to summary |
|---|---|
| private final int major Record Component accessed by major(). major version | |
| micro | back to summary |
|---|---|
| private final int micro Record Component accessed by micro(). micro version | |
| minor | back to summary |
|---|---|
| private final int minor Record Component accessed by minor(). minor version | |
| OSVersion | back to summary |
|---|---|
| public OSVersion(int major, int minor) Returns a Version for major, minor versions.
| |
| OSVersion | back to summary |
|---|---|
| public OSVersion(int major, int minor, int micro) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(OSVersion other) Implements java. Returns Compare this version with another version. | |
| current | back to summary |
|---|---|
| public static OSVersion current() Returns the current operating system version.
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| initVersion | back to summary |
|---|---|
| private static OSVersion initVersion() | |
| major | back to summary |
|---|---|
| public int major() Record Component getter of major.
| |
| micro | back to summary |
|---|---|
| public int micro() Record Component getter of micro.
| |
| minor | back to summary |
|---|---|
| public int minor() Record Component getter of minor.
| |
| parse | back to summary |
|---|---|
| public static OSVersion parse(String str) throws IllegalArgumentException Returns A Version parsed from a version string split on "." characters. Only major, minor, and micro version numbers are parsed, finer detail is ignored. Missing values for minor and micro are replaced with zero. The string must start with a number, if there is a '.' it must be followed by a number. Parsed by hand because it is called before RegEx can be initialized safely.
| |
| skipDigits | back to summary |
|---|---|
| private static int skipDigits(String s, int start) Returns The index of the first non-digit from start.
| |
| toString | back to summary |
|---|---|
| public String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.
| |