public class ArtifactRange extends Object
| Constructor and Description |
|---|
ArtifactRange(Id.Namespace namespace,
String name,
ArtifactVersion lower,
ArtifactVersion upper) |
ArtifactRange(Id.Namespace namespace,
String name,
ArtifactVersion lower,
boolean isLowerInclusive,
ArtifactVersion upper,
boolean isUpperInclusive) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
ArtifactVersion |
getLower() |
String |
getName() |
Id.Namespace |
getNamespace() |
ArtifactVersion |
getUpper() |
int |
hashCode() |
static ArtifactRange |
parse(Id.Namespace namespace,
String artifactRangeStr)
Parses an unnamespaced string representation of an artifact range.
|
static ArtifactRange |
parse(String artifactRangeStr)
Parses the string representation of an artifact range, which is of the form:
{namespace}:{name}[{lower-version},{upper-version}].
|
String |
toNonNamespacedString()
Return the range as a string without the namespace.
|
String |
toString() |
boolean |
versionIsInRange(ArtifactVersion version) |
public ArtifactRange(Id.Namespace namespace, String name, ArtifactVersion lower, ArtifactVersion upper)
public ArtifactRange(Id.Namespace namespace, String name, ArtifactVersion lower, boolean isLowerInclusive, ArtifactVersion upper, boolean isUpperInclusive)
public Id.Namespace getNamespace()
public String getName()
public ArtifactVersion getLower()
public ArtifactVersion getUpper()
public boolean versionIsInRange(ArtifactVersion version)
public String toNonNamespacedString()
public static ArtifactRange parse(String artifactRangeStr) throws InvalidArtifactRangeException
toString().
For example, default:my-functions[1.0.0,2.0.0) will correspond to an artifact name of my-functions with a
lower version of 1.0.0 and an upper version of 2.0.0 in the default namespace.artifactRangeStr - the string representation to parseInvalidArtifactRangeException - if the string is malformed, or if the lower version is higher than the upperpublic static ArtifactRange parse(Id.Namespace namespace, String artifactRangeStr) throws InvalidArtifactRangeException
namespace - the namespace of the artifact rangeartifactRangeStr - the string representation to parseInvalidArtifactRangeException - if the string is malformed, or if the lower version is higher than the upperCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.