public class NodeVersion<T> extends java.lang.Object implements java.lang.Comparable<NodeVersion<T>>
| Constructor and Description |
|---|
NodeVersion(java.lang.String str)
Create a new version descriptor.
|
NodeVersion(java.lang.String str,
T att) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(NodeVersion v) |
boolean |
equals(java.lang.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) |
java.lang.String |
toString() |
public NodeVersion(java.lang.String str)
throws java.lang.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.
java.lang.IllegalArgumentExceptionpublic NodeVersion(java.lang.String str,
T att)
throws java.lang.IllegalArgumentException
java.lang.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 java.lang.Comparable<NodeVersion<T>>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018 Apigee Corporation. All Rights Reserved.