Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.version
Class VersionString  view VersionString download VersionString.java

java.lang.Object
  extended bycom.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.
 
Constructor Summary
VersionString(java.lang.String sVersion)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

naTokens

private int[] naTokens
Holds every segment value in the Version String.

Constructor Detail

VersionString

public VersionString(java.lang.String sVersion)
              throws InvalidVersionStringException
Method Detail

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.