|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.doolin.util.Version
public class Version
Definition of a version on one or more numbers.
| Field Summary | |
|---|---|
static int |
MAJOR
Position of the major version number |
static int |
MINOR
Position of the minor version number |
static int |
PATCH
Position of the patch version number |
| Constructor Summary | |
|---|---|
Version()
0.0.0 version |
|
Version(int... numbers)
Constructor |
|
Version(String value)
Parsing of a version number |
|
| Method Summary | |
|---|---|
int |
compareTo(Version v)
Compares two versions |
boolean |
equals(Object obj)
|
int |
getDimension()
Returns the number of versions numbers |
int |
getMajor()
|
int |
getMinor()
|
int |
getNumber(int position)
|
int |
getPatch()
|
int |
hashCode()
|
int[] |
toArray()
Gets a copy of the version array. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MAJOR
public static final int MINOR
public static final int PATCH
| Constructor Detail |
|---|
public Version(int... numbers)
numbers - Version numbers, from the most major to the most minorpublic Version(String value)
value - String to parse.public Version()
| Method Detail |
|---|
public int getNumber(int position)
position - Position to get (must be >= 0)
public int getMajor()
public int getMinor()
public int getPatch()
public int hashCode()
hashCode in class ObjectObject.hashCode()public int getDimension()
public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public String toString()
toString in class ObjectObject.toString()public int[] toArray()
public int compareTo(Version v)
compareTo in interface Comparable<Version>v - Version to compare to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||