public class NodeVersion<T> extends Object implements Comparable<NodeVersion<T>>
| Constructor and Description |
|---|
NodeVersion(String str)
Create a new version descriptor.
|
NodeVersion(String str,
T att) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(NodeVersion v) |
boolean |
equals(Object o) |
T |
getAttachment() |
int |
getMajor() |
int |
getMinor() |
int |
getRelease() |
int |
hashCode() |
void |
setAttachment(T a) |
void |
setMajor(int major) |
void |
setMinor(int minor) |
void |
setRelease(int release) |
String |
toString() |
public NodeVersion(String str) throws IllegalArgumentException
Create a new version descriptor. Descriptors take the format "major.minor.release", where each is a positive integer or "x" to denote a wildcard. For instance, "1.2.3", "1.2.x", "1.2", "1.x", "1", and "x" are all valid. Any missing digits are treated as an "x".
Version numbers may be checked for equality, again with any "x" standing for a wildcard. In addition, they may be sorted, although if they contain any wildcards then the sort order will not be consistent.
IllegalArgumentExceptionpublic NodeVersion(String str, T att) throws IllegalArgumentException
IllegalArgumentExceptionpublic T getAttachment()
public void setAttachment(T a)
public int getMajor()
public void setMajor(int major)
public int getMinor()
public void setMinor(int minor)
public int getRelease()
public void setRelease(int release)
public int compareTo(NodeVersion v)
compareTo in interface Comparable<NodeVersion<T>>Copyright © 2016 Apigee Corporation. All Rights Reserved.