versions.
A range has a left (lower) endpoint and a right (upper) endpoint. Each endpoint can be open (excluded from the set) or closed (included in the set).
VersionRange objects are immutable.
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private static final String | |
| private transient int | |
| private final Version | |
| public static final char | LEFT_CLOSED
The left endpoint is closed and is included in the range. |
| private static final String | |
| private static final String | |
| public static final char | LEFT_OPEN
The left endpoint is open and is excluded from the range. |
| private static final String | |
| private final boolean | |
| private final Version | |
| public static final char | RIGHT_CLOSED
The right endpoint is closed and is included in the range. |
| private static final String | |
| private static final String | |
| public static final char | RIGHT_OPEN
The right endpoint is open and is excluded from the range. |
| private static final String | |
| private final boolean | |
| private transient String |
| Access | Constructor and Description |
|---|---|
| public | VersionRange(char
Must be either leftType, Version LEFT_CLOSED or LEFT_OPEN
.Left endpoint of range. Must not be leftEndpoint, Version null.Right endpoint of range. May be rightEndpoint, char null to
indicate the right endpoint is Infinity.Must be either rightType)RIGHT_CLOSED or
RIGHT_OPEN.Creates a version range from the specified versions. |
| public | VersionRange(String
String representation of the version range. The versions in
the range must contain no whitespace. Other whitespace in the
range string is ignored. Must not be range)null.Creates a version range from the specified string. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if object is a VersionRange and is
equal to this object; false otherwise.The object)VersionRange object to be compared.Overrides java. Compares this |
| public Version | |
| public char | |
| public Version | Returns: The right endpoint. May benull which indicates the right
endpoint is Infinity.Returns the right endpoint of this version range. |
| public char | |
| public int | Returns: An integer which is a hash code value for this object.Overrides java. Returns a hash code value for the object. |
| public boolean | |
| public VersionRange | Returns: A version range representing the intersection of this version range and the specified version ranges. If no version ranges are specified, then this version range is returned.The version ranges to intersect with this version range. ranges)Returns the intersection of this version range with the specified version ranges. |
| public boolean | Returns: true if this version range is empty; false
otherwise.Returns whether this version range is empty. |
| private boolean | |
| public boolean | Returns: true if this version range contains only a single
version; false otherwise.Returns whether this version range contains only a single version. |
| private static Version | Returns: Versionversion component string version, String Complete range string for exception message, if any range)Parse version component into a Version. |
| public String | Returns: A filter string for this version range using the specified attribute name.The attribute name to use in the returned filter
string. attributeName)Returns the filter string for this version range using the specified attribute name. |
| public String | Returns: The string representation of this version range.Overrides java. Returns the string representation of this version range. |
| public static VersionRange | Returns: AVersionRange object representing the version range.String representation of the version range. The versions in
the range must contain no whitespace. Other whitespace in the
range string is ignored. Must not be range)null.Returns a |
| empty | back to summary |
|---|---|
| private final boolean empty | |
| ENDPOINT_DELIMITER | back to summary |
|---|---|
| private static final String ENDPOINT_DELIMITER | |
| hash | back to summary |
|---|---|
| private transient int hash | |
| left | back to summary |
|---|---|
| private final Version left | |
| LEFT_CLOSED | back to summary |
|---|---|
| public static final char LEFT_CLOSED The left endpoint is closed and is included in the range.
The value of | |
| LEFT_CLOSED_DELIMITER | back to summary |
|---|---|
| private static final String LEFT_CLOSED_DELIMITER | |
| LEFT_DELIMITERS | back to summary |
|---|---|
| private static final String LEFT_DELIMITERS | |
| LEFT_OPEN | back to summary |
|---|---|
| public static final char LEFT_OPEN The left endpoint is open and is excluded from the range.
The value of | |
| LEFT_OPEN_DELIMITER | back to summary |
|---|---|
| private static final String LEFT_OPEN_DELIMITER | |
| leftClosed | back to summary |
|---|---|
| private final boolean leftClosed | |
| right | back to summary |
|---|---|
| private final Version right | |
| RIGHT_CLOSED | back to summary |
|---|---|
| public static final char RIGHT_CLOSED The right endpoint is closed and is included in the range.
The value of | |
| RIGHT_CLOSED_DELIMITER | back to summary |
|---|---|
| private static final String RIGHT_CLOSED_DELIMITER | |
| RIGHT_DELIMITERS | back to summary |
|---|---|
| private static final String RIGHT_DELIMITERS | |
| RIGHT_OPEN | back to summary |
|---|---|
| public static final char RIGHT_OPEN The right endpoint is open and is excluded from the range.
The value of | |
| RIGHT_OPEN_DELIMITER | back to summary |
|---|---|
| private static final String RIGHT_OPEN_DELIMITER | |
| rightClosed | back to summary |
|---|---|
| private final boolean rightClosed | |
| versionRangeString | back to summary |
|---|---|
| private transient String versionRangeString | |
| VersionRange | back to summary |
|---|---|
| public VersionRange(char leftType, Version leftEndpoint, Version rightEndpoint, char rightType) Creates a version range from the specified versions.
| |
| VersionRange | back to summary |
|---|---|
| public VersionRange(String range) Creates a version range from the specified string. Version range string grammar:
range ::= interval | atleast
interval ::= ( '[' | '(' ) left ',' right ( ']' | ')' )
left ::= version
right ::= version
atleast ::= version
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Compares this
A version range is considered to be equal to another version
range if both the endpoints and their types are equal or if both version
ranges are | |
| getLeft | back to summary |
|---|---|
| public Version getLeft() Returns the left endpoint of this version range.
| |
| getLeftType | back to summary |
|---|---|
| public char getLeftType() Returns the type of the left endpoint of this version range.
| |
| getRight | back to summary |
|---|---|
| public Version getRight() Returns the right endpoint of this version range.
| |
| getRightType | back to summary |
|---|---|
| public char getRightType() Returns the type of the right endpoint of this version range.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hash code value for the object.
| |
| includes | back to summary |
|---|---|
| public boolean includes(Version version) Returns whether this version range includes the specified version.
| |
| intersection | back to summary |
|---|---|
| public VersionRange intersection(VersionRange... ranges) Returns the intersection of this version range with the specified version ranges.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns whether this version range is empty. A version range is empty if the set of versions defined by the interval is empty.
| |
| isEmpty0 | back to summary |
|---|---|
| private boolean isEmpty0() Internal isEmpty behavior.
| |
| isExact | back to summary |
|---|---|
| public boolean isExact() Returns whether this version range contains only a single version.
| |
| parseVersion | back to summary |
|---|---|
| private static Version parseVersion(String version, String range) Parse version component into a Version. | |
| toFilterString | back to summary |
|---|---|
| public String toFilterString(String attributeName) Returns the filter string for this version range using the specified attribute name.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns the string representation of this version range.
The format of the version range string will be a version string if the
right end point is Infinity ( | |
| valueOf | back to summary |
|---|---|
| public static VersionRange valueOf(String range) Returns a
See
| |