public abstract class IdeVersion extends java.lang.Object implements java.lang.Comparable<IdeVersion>
| Constructor and Description |
|---|
IdeVersion() |
| Modifier and Type | Method and Description |
|---|---|
abstract long |
asLong() |
java.lang.String |
asString() |
abstract java.lang.String |
asString(boolean includeProductCode,
boolean includeSnapshotMarker)
Returns a string presentation of
this version. |
java.lang.String |
asStringWithoutProductCode() |
java.lang.String |
asStringWithoutProductCodeAndSnapshot() |
int |
compareTo(IdeVersion other) |
static IdeVersion |
createIdeVersion(java.lang.String version)
Tries to parse specified string as IDE version and throws an
IllegalArgumentException
if the string is not a valid IDE version. |
static IdeVersion |
createIdeVersionIfValid(java.lang.String version)
Tries to parse specified string as IDE version and returns null if not succeed.
|
boolean |
equals(java.lang.Object obj) |
abstract int |
getBaselineVersion() |
abstract int |
getBuild() |
abstract int[] |
getComponents() |
abstract java.lang.String |
getProductCode() |
int |
hashCode() |
abstract boolean |
isSnapshot() |
static boolean |
isValidIdeVersion(java.lang.String version)
Determines whether the specified string is a valid
IdeVersion. |
@NotNull public static IdeVersion createIdeVersion(@NotNull java.lang.String version) throws java.lang.IllegalArgumentException
IllegalArgumentException
if the string is not a valid IDE version.version - a string presentation of a version to be parsedIdeVersionjava.lang.IllegalArgumentException - if specified version doesn't represent correct IdeVersiona version of the method that returns null instead of exception@Nullable public static IdeVersion createIdeVersionIfValid(@NotNull java.lang.String version)
version - a string presentation of a version to be parsedIdeVersion for specified string, or null
if the string is not a valid IDE versionpublic static boolean isValidIdeVersion(@NotNull
java.lang.String version)
IdeVersion.version - string which must be validatedIdeVersion, false otherwise@NotNull
public abstract java.lang.String asString(boolean includeProductCode,
boolean includeSnapshotMarker)
this version.
For the details of the presentation form refer to
IntelliJ Build Number Ranges.
Examples are:
includeProductCode - whether to append product codeincludeSnapshotMarker - whether to append SNAPSHOT marker (if present)@NotNull public java.lang.String asString()
public java.lang.String asStringWithoutProductCode()
public java.lang.String asStringWithoutProductCodeAndSnapshot()
@NotNull public abstract java.lang.String getProductCode()
public abstract int getBaselineVersion()
public abstract int getBuild()
public abstract boolean isSnapshot()
public abstract int[] getComponents()
public abstract long asLong()
public final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final int compareTo(@NotNull
IdeVersion other)
compareTo in interface java.lang.Comparable<IdeVersion>