Index: lib/src/version_constraint.dart |
diff --git a/lib/src/version_constraint.dart b/lib/src/version_constraint.dart |
index 68827a40c4c9084336df94f3cc7bac4f973a1678..edd8abd0729c4b38f167aad50f4fc33c06411d94 100644 |
--- a/lib/src/version_constraint.dart |
+++ b/lib/src/version_constraint.dart |
@@ -229,13 +229,17 @@ abstract class VersionConstraint { |
/// allows. |
bool allowsAny(VersionConstraint other); |
- /// Creates a new [VersionConstraint] that only allows [Version]s allowed by |
- /// both this and [other]. |
+ /// Returns a [VersionConstraint] that only allows [Version]s allowed by both |
+ /// this and [other]. |
VersionConstraint intersect(VersionConstraint other); |
- /// Creates a new [VersionConstraint] that allows [Versions]s allowed by |
- /// either this or [other]. |
+ /// Returns a [VersionConstraint] that allows [Versions]s allowed by either |
+ /// this or [other]. |
VersionConstraint union(VersionConstraint other); |
+ |
+ /// Returns a [VersionConstraint] that allows [Version]s allowed by this but |
+ /// not [other]. |
+ VersionConstraint difference(VersionConstraint other); |
} |
class _EmptyVersion implements VersionConstraint { |
@@ -248,6 +252,7 @@ class _EmptyVersion implements VersionConstraint { |
bool allowsAny(VersionConstraint other) => false; |
VersionConstraint intersect(VersionConstraint other) => this; |
VersionConstraint union(VersionConstraint other) => other; |
+ VersionConstraint difference(VersionConstraint other) => this; |
String toString() => '<empty>'; |
} |