Class SimpleRange
java.lang.Object
net.adoptopenjdk.icedteaweb.jnlp.version.SimpleRange
A simple-range is either a version-id, a version-id followed by a star (*) or a version-id followed by a plus sign (+).
The star means prefix match, the plus sign means this version or greater.
The syntax of version-strings is:
simple-range ::= version-id | version-id modifier
modifier ::= "+" | "*"
See JSR-56 Specification, Appendix A.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if this simple-range contains the givenversionId.booleanCheck if this simple-range contains the givenversionId.booleanprivate static VersionModifierextractModifier(String simpleRange) private static VersionIdextractVersionId(String simpleRange) static SimpleRangefromString(String simpleRange) Construct a simple-range by the givensimpleRange.(package private) VersionId(package private) boolean(package private) boolean(package private) booleanisEqualTo(SimpleRange otherSimpleRange) (package private) booleanChecks whether this simple-range represents a single version-id without any postfix modifiers.toString()Provides a string representation of thisSimpleRange.
-
Field Details
-
versionId
-
modifier
-
-
Constructor Details
-
SimpleRange
-
-
Method Details
-
isExactVersion
boolean isExactVersion()Checks whether this simple-range represents a single version-id without any postfix modifiers.- Returns:
trueif this simple-range does not have any modifiers,falseotherwise.
-
getExactVersion
VersionId getExactVersion()- Returns:
- the exact version if this simple-range is one
- Throws:
IllegalStateException- if this simple-range is not one
-
hasPrefixMatchModifier
boolean hasPrefixMatchModifier() -
hasGreaterThanOrEqualMatchModifier
boolean hasGreaterThanOrEqualMatchModifier() -
fromString
Construct a simple-range by the givensimpleRange.- Parameters:
simpleRange- a simple-range- Returns:
- a SimpleRange
-
extractModifier
-
extractVersionId
-
toString
Provides a string representation of thisSimpleRange. -
isEqualTo
-
equals
-
contains
Check if this simple-range contains the givenversionId.- Parameters:
otherVersionId- a version-id- Returns:
trueif this version-range containsversionId,falseotherwise.
-
contains
Check if this simple-range contains the givenversionId.- Parameters:
otherVersionId- a version-id- Returns:
trueif this version-range containsversionId,falseotherwise.
-