Package xyz.rk0cc.josev
Class SemVerRange
java.lang.Object
xyz.rk0cc.josev.SemVerRange
- All Implemented Interfaces:
Serializable
,SemVerDetermineInRange
- Direct Known Subclasses:
SemVerConstraint
Define range of the
Since
Using to assign version constraint class
SemVer
.
Since
SemVer
contains pre-release
and build
tag which they
are String
and difficult to predict next SemVer
in a Collection
. As a result,
determine is in range with SemVer.isGreater(SemVer)
, SemVer.isLower(SemVer)
or more.
Using to assign version constraint class
SemVerConstraint
is inherited from
SemVerRange
.- Since:
- 1.0.0
- See Also:
-
Constructor Summary
ConstructorDescriptionSemVerRange
(SemVerRangeNode start, SemVerRangeNode end) Create new range definition ofSemVer
. -
Method Summary
Modifier and TypeMethodDescriptionend()
A node which specify the maximum version that can be accepted (Assume no version omitted betweenstart
and end).final boolean
Check thissemVer
is in the range.boolean
Check thissemVer
is in the range.start()
A node which specify the minimum version that can be accepted (Assume no version omitted between start andstart
).
-
Constructor Details
-
SemVerRange
Create new range definition ofSemVer
.- Parameters:
start
- The range start from.end
- The range end at.
-
-
Method Details
-
start
A node which specify the minimum version that can be accepted (Assume no version omitted between start andstart
).- Returns:
- A node of version information that can be assembled to traditional syntax.
- See Also:
-
end
A node which specify the maximum version that can be accepted (Assume no version omitted betweenstart
and end).- Returns:
- A node of version information that can be assembled to traditional syntax.
- See Also:
-
isInRange
Check thissemVer
is in the range.
Mostly, pre-release version is not consider in the range. It will has proper document if this accepts pre-release ofSemVer
.- Specified by:
isInRange
in interfaceSemVerDetermineInRange
- Parameters:
semVer
- A version that to determine is in the constraint range.- Returns:
true
if in range.
-
isInRange
Check thissemVer
is in the range.- Specified by:
isInRange
in interfaceSemVerDetermineInRange
- Parameters:
semVer
- A version that to determine is in the constraint range.- Returns:
true
if in range.- Throws:
NonStandardSemVerException
- WhensemVer
String
can not beparsed
.
-