PackageVersionNumberGeneralLibraryConstraint class abstract
A PackageVersionNumberGeneralLibraryConstraint is a predicate that can determine whether a given version is valid or not.
For example, a ">= 2.0.0" constraint allows any version that is "2.0.0" or greater. PackageVersionNumberGeneralLibrary objects themselves implement this to match a specific version.
Constructors
- PackageVersionNumberGeneralLibraryConstraint.compatibleWith(PackageVersionNumberGeneralLibrary version)
-
Creates a version constraint which allows all versions that are
backward compatible with
version
.factory -
PackageVersionNumberGeneralLibraryConstraint.intersection(Iterable<
PackageVersionNumberGeneralLibraryConstraint> constraints) -
Creates a new version constraint that is the intersection of
constraints
.factory - PackageVersionNumberGeneralLibraryConstraint.parse(String text)
-
Parses a version constraint.
factory
-
PackageVersionNumberGeneralLibraryConstraint.unionOf(Iterable<
PackageVersionNumberGeneralLibraryConstraint> constraints) -
Creates a new version constraint that is the union of
constraints
.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAny → bool
-
Returns
true
if this constraint allows all versions.no setter - isEmpty → bool
-
Returns
true
if this constraint allows no versions.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allows(
PackageVersionNumberGeneralLibrary version) → bool -
Returns
true
if this constraint allowsversion
. -
allowsAll(
PackageVersionNumberGeneralLibraryConstraint other) → bool -
Returns
true
if this constraint allows all the versions thatother
allows. -
allowsAny(
PackageVersionNumberGeneralLibraryConstraint other) → bool -
Returns
true
if this constraint allows any of the versions thatother
allows. -
difference(
PackageVersionNumberGeneralLibraryConstraint other) → PackageVersionNumberGeneralLibraryConstraint -
Returns a PackageVersionNumberGeneralLibraryConstraint that allows PackageVersionNumberGeneralLibrarys allowed by this but
not
other
. -
intersect(
PackageVersionNumberGeneralLibraryConstraint other) → PackageVersionNumberGeneralLibraryConstraint -
Returns a PackageVersionNumberGeneralLibraryConstraint that only allows PackageVersionNumberGeneralLibrarys allowed by both
this and
other
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
union(
PackageVersionNumberGeneralLibraryConstraint other) → PackageVersionNumberGeneralLibraryConstraint -
Returns a PackageVersionNumberGeneralLibraryConstraint that allows PackageVersionNumberGeneralLibrarys allowed by either
this or
other
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- any ↔ PackageVersionNumberGeneralLibraryConstraint
-
A PackageVersionNumberGeneralLibraryConstraint that allows all versions.
getter/setter pair
- empty ↔ PackageVersionNumberGeneralLibraryConstraint
-
A PackageVersionNumberGeneralLibraryConstraint that allows no versions -- the empty set.
getter/setter pair