public final class VersionRange extends Object
Constructor and Description |
---|
VersionRange(String version) |
VersionRange(String version,
boolean exactVersion)
This method should be used to create a version range from a single
version string.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
Version |
getExactVersion()
this method returns the exact version from the versionInfo obj.
|
Version |
getMaximumVersion()
get the maximum version
|
Version |
getMinimumVersion()
get the minimum version
|
int |
hashCode() |
VersionRange |
intersect(VersionRange r)
Create a new version range that is the intersection of
this and the argument. |
boolean |
isExactVersion()
check if the versioninfo is the exact version
|
boolean |
isMaximumExclusive()
is the maximum version exclusive
|
boolean |
isMaximumUnbounded()
is the maximum version unbounded
|
boolean |
isMinimumExclusive()
is the minimum version exclusive
|
boolean |
matches(Version version)
This method checks that the provided version matches the desired version.
|
static VersionRange |
parseVersionRange(String s)
Parse a version range..
|
static VersionRange |
parseVersionRange(String s,
boolean exactVersion)
Parse a version range and indicate if the version is an exact version
|
String |
toString() |
public VersionRange(String version)
version
- version for the verioninfopublic VersionRange(String version, boolean exactVersion)
version
- version for the versioninfoexactVersion
- whether this is an exact version true
or goes to infinity
false
public Version getExactVersion()
public Version getMaximumVersion()
public Version getMinimumVersion()
public boolean isMaximumExclusive()
public boolean isMaximumUnbounded()
public boolean isMinimumExclusive()
public boolean matches(Version version)
version
- the version.public boolean isExactVersion()
public VersionRange intersect(VersionRange r)
this
and the argument.
In other words, the largest version range that lies within both this
and
the parameter.r
- a version range to be intersected with this
.null
if no intersection is possible.public static VersionRange parseVersionRange(String s) throws IllegalArgumentException
s
- IllegalArgumentException
- if the String could not be parsed as a VersionRangepublic static VersionRange parseVersionRange(String s, boolean exactVersion) throws IllegalArgumentException
s
- exactVersion
- IllegalArgumentException
- if the String could not be parsed as a VersionRangeCopyright © 2010 - 2020 Adobe. All Rights Reserved