|
Jalopy 1.0b10 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.hunsicker.util.Version
A class that represents version information. Version numbering follows the "Dewey Decimal" syntax that consists of positive decimal integers separated by periods "."
Constructor Summary | |
Version(String name,
int major,
int minor)
Creates a new Version object. |
|
Version(String name,
int major,
int minor,
int micro)
Creates a new Version object. |
|
Version(String name,
int major,
int minor,
int micro,
boolean beta)
Creates a new Version object. |
Method Summary | |
boolean |
equals(Object o)
{@inheritDoc} |
byte |
getMajorNumber()
Returns the major version number. |
byte |
getMicroNumber()
Returns the micro version number. |
byte |
getMinorNumber()
Returns the minor version number. |
String |
getName()
Returns the version name. |
int |
hashCode()
{@inheritDoc} |
boolean |
isBeta()
Indicates whether this version represents a beta state. |
String |
toString()
{@inheritDoc} |
static Version |
valueOf(String version)
Returns the version object for the given string. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Version(String name, int major, int minor)
name
- a product version name, may be null
major
- the major version number.minor
- the minor version number.public Version(String name, int major, int minor, int micro)
name
- a product version name, may be null
major
- the major version number.minor
- the minor version number.micro
- the micro version number.public Version(String name, int major, int minor, int micro, boolean beta)
name
- a product version name, may be null
major
- the major version number.minor
- the minor version number.micro
- the micro version number.beta
- true
indicates that this is a beta version.Method Detail |
public boolean isBeta()
true
if this version represents a beta state.public byte getMajorNumber()
public byte getMicroNumber()
public byte getMinorNumber()
public String getName()
null
if no product version name was
specified.public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public static Version valueOf(String version)
version
- a string representing version information. The string must consist
of multiple (up to three) positive decimal integers separated by periods
and may contain the character 'b
' instead of the last period
(indicating a beta version). E.g. 1.0
, 1.4.1
,
1.0b5
are valid, 1
, 1b5
,
1.3.3.1
are not.IllegalArgumentException
- if version represents no valid version
information.
|
Jalopy 1.0b10 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |