java.lang.Object
com.flexstor.common.version.VersionString
- public class VersionString
- extends java.lang.Object
VersionString is the class that represents a Version Number string providing
functionality to operate over the version value, including
validation, comparation, increasing and decreasing.
This class should be used to wrap a Version String value wherever
the value needs to be processed.
Classes like com.flexstor.common.awt.table.Table has been provided
with support for sorting VersionString objects.
- Version:
- 3.0
|
Field Summary |
private int[] |
naTokens
Holds every segment value in the Version String. |
|
Method Summary |
int |
compareTo(VersionString vsVersion)
Compares two VersionString objects. |
boolean |
decrement()
Decreases the current version substractiong 1 from the value in the last segment
of the version number, if it is not equals to 0. |
private int[] |
getTokens()
Retrieves a list of the segment values in the Version String. |
void |
increment()
Increases the current version adding 1 to the value in the last segment
of the version number. |
java.lang.String |
toString()
Retrieves the string representation of this Version number. |
naTokens
private int[] naTokens
- Holds every segment value in the Version String.
VersionString
public VersionString(java.lang.String sVersion)
throws InvalidVersionStringException
getTokens
private int[] getTokens()
- Retrieves a list of the segment values in the Version String.
compareTo
public int compareTo(VersionString vsVersion)
- Compares two VersionString objects.
toString
public java.lang.String toString()
- Retrieves the string representation of this Version number.
increment
public void increment()
- Increases the current version adding 1 to the value in the last segment
of the version number.
decrement
public boolean decrement()
- Decreases the current version substractiong 1 from the value in the last segment
of the version number, if it is not equals to 0.