VersionRange class
Constrains versions to a fall within a given range.
If there is a minimum, then this only allows versions that are at that
minimum or greater. If there is a maximum, then only versions less than
that are allowed. In other words, this allows >= min, < max
.
Version ranges are ordered first by their lower bounds, then by their upper
bounds. For example, >=1.0.0 <2.0.0
is before >=1.5.0 <2.0.0
is before
>=1.5.0 <3.0.0
.
- Implemented types
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, override
- includeMax → bool
-
If
true
, then max is allowed by the range.final - includeMin → bool
-
If
true
then min is allowed by the range.final - isAny → bool
-
Returns
true
if this constraint allows all versions.read-only, override - isEmpty → bool
-
Returns
true
if this constraint allows no versions.read-only, override - max → Version
-
The maximum end of the range. [...]
final
- min → Version
-
The minimum end of the range. [...]
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
allows(
Version other) → bool -
Tests if
other
falls within this version range.override -
allowsAll(
VersionConstraint other) → bool -
Returns
true
if this constraint allows all the versions thatother
allows.override -
allowsAny(
VersionConstraint other) → bool -
Returns
true
if this constraint allows any of the versions thatother
allows.override -
compareTo(
VersionRange other) → int -
Compares this object to another Comparable [...]
override
-
difference(
VersionConstraint other) → VersionConstraint -
Returns a VersionConstraint that allows Versions allowed by this but
not
other
.override -
intersect(
VersionConstraint other) → VersionConstraint -
Returns a VersionConstraint that only allows Versions allowed by both
this and
other
.override -
toString(
) → String -
Returns a string representation of this object.
override
-
union(
VersionConstraint other) → VersionConstraint -
Returns a VersionConstraint that allows
Versions
s allowed by either this orother
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
override