Interface VersionInterval
public interface VersionInterval
Representation of a version interval, closed or open.
The represented version interval is contiguous between its lower and upper limit, disjoint intervals are built
using collections of VersionInterval
. Empty intervals may be represented by null
or any interval
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<VersionInterval>
Compute the intersection between two potentially disjoint of version intervals.default VersionInterval
static VersionInterval
Compute the intersection between two version intervals.getMax()
Get the upper limit of the version interval.getMin()
Get the lower limit of the version interval.boolean
Get whether the upper limit of the version interval is inclusive.boolean
Get whether the lower limit of the version interval is inclusive.boolean
Get whether the interval usesSemanticVersion
compatible bounds.default List<VersionInterval>
not()
static List<VersionInterval>
not
(Collection<VersionInterval> intervals) static List<VersionInterval>
not
(VersionInterval interval) default List<VersionInterval>
static List<VersionInterval>
Compute the union between multiple version intervals.
-
Field Details
-
INFINITE
-
-
Method Details
-
isSemantic
boolean isSemantic()Get whether the interval usesSemanticVersion
compatible bounds.- Returns:
- True if both bounds are open (null),
SemanticVersion
instances or a combination of both, false otherwise.
-
getMin
Version getMin()Get the lower limit of the version interval.- Returns:
- Version's lower limit or null if none, inclusive depending on
isMinInclusive()
-
isMinInclusive
boolean isMinInclusive()Get whether the lower limit of the version interval is inclusive.- Returns:
- True if inclusive, false otherwise
-
getMax
Version getMax()Get the upper limit of the version interval.- Returns:
- Version's upper limit or null if none, inclusive depending on
isMaxInclusive()
-
isMaxInclusive
boolean isMaxInclusive()Get whether the upper limit of the version interval is inclusive.- Returns:
- True if inclusive, false otherwise
-
and
-
or
-
not
-
and
Compute the intersection between two version intervals. -
and
Compute the intersection between two potentially disjoint of version intervals. -
or
Compute the union between multiple version intervals. -
not
-
not
-