Class VersionRange
- java.lang.Object
-
- com._1c.g5.v8.dt.platform.version.VersionRange
-
-
Field Summary
Fields Modifier and Type Field Description static VersionRangeEMPTY_RANGEAn empty version range.booleanmaxInclusiveVersionmaxVersionbooleanminInclusiveVersionminVersion
-
Constructor Summary
Constructors Constructor Description VersionRange(Version minVersion, boolean minInclusive, Version maxVersion, boolean maxInclusive)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisInRange(Version version)Checks that current range containsversionbooleanisIntersect(VersionRange range)Checks version range for intersect
-
-
-
Field Detail
-
EMPTY_RANGE
public static final VersionRange EMPTY_RANGE
An empty version range. The empty version range includes all valid versions (any version greater than or equal to the version 0.0.0).
-
minVersion
public final Version minVersion
-
minInclusive
public final boolean minInclusive
-
maxVersion
public final Version maxVersion
-
maxInclusive
public final boolean maxInclusive
-
-
Constructor Detail
-
VersionRange
public VersionRange(Version minVersion, boolean minInclusive, Version maxVersion, boolean maxInclusive)
Constructor- Parameters:
minVersion- min version of range, can't benullminInclusive- inclusive or not forminVersionmaxVersion- max version of range, ifnullthen maxVersion = new Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE)maxInclusive- inclusive or not formaxVersion- Throws:
IllegalArgumentException- if validation error was detected
-
-
Method Detail
-
isIntersect
public boolean isIntersect(VersionRange range)
Checks version range for intersect- Parameters:
range- checking range, can't benull- Returns:
trueif intersect
-
isInRange
public boolean isInRange(Version version)
Checks that current range containsversion- Parameters:
version- checking version, can't benull- Returns:
trueif intersect
-
-