|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.symbols.Version
public class Version
Class Version
represents a symbol version of the general
form "V1.V2...Vn" where Vi is a non-negative integer. Trailing zeros
in the version number are not significant. That is, "1.2" is the same
as "1.2.0" and "1.2.0.0.0".
Constructor Summary | |
---|---|
Version()
Create a new Version class that will be constructed
through member function appendVersionNumber . |
|
Version(java.lang.String version)
Create a new Version class by parsing a version string
of the form "V1.V2...Vn" where each Vi is a non-negative integer. |
Method Summary | |
---|---|
void |
appendVersionNumber(int v)
Add another version number to the existing version description. |
int |
getVersionLength()
Return the number of sub-parts in the version description. |
int |
getVersionNumberAt(int i)
Return the version number at a particular location of the version string using zero-based indexing. |
java.lang.String |
getVersionString()
Return the current version description as a version string. |
int |
hashCode()
Return a hash code for a version. |
boolean |
isGreaterThan(Version other)
Return whether this version is greater than the version in the argument. |
boolean |
isSame(Version other)
Return whether two version objects represent the same version number. |
boolean |
isUnspecified()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Version()
Version
class that will be constructed
through member function appendVersionNumber
. An empty
version is considered to be version "0".
public Version(java.lang.String version) throws java.lang.NumberFormatException
Version
class by parsing a version string
of the form "V1.V2...Vn" where each Vi is a non-negative integer.
If the version is not of this form, then the constructor throws a
NumberFormatException
.
java.lang.NumberFormatException
Method Detail |
---|
public void appendVersionNumber(int v)
NumberFormatException
is
thrown.
public java.lang.String getVersionString()
public int getVersionLength()
public boolean isUnspecified()
public int getVersionNumberAt(int i)
public boolean isSame(Version other)
public boolean isGreaterThan(Version other)
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |