ru.yandex.jenkins.plugins.debuilder
Class VersionHelper

java.lang.Object
  extended by ru.yandex.jenkins.plugins.debuilder.VersionHelper

public class VersionHelper
extends Object

Encapsulates version information and helps with manipulation

Author:
pupssman

Constructor Summary
VersionHelper(String version)
          As VersionHelper#VersionHelper(String, String) with "." separator
VersionHelper(String[] versionElements, String separator)
          Constructs new helper with given version elements.
VersionHelper(String version, char separatorCharacter)
          As VersionHelper#VersionHelper(String[]) with elements got by splitting string with given character.
 
Method Summary
 int getMinorVersion()
           
 String getRevision()
           
 void setMinorVersion(int newVersion)
           
 void setRevision(String revision)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VersionHelper

public VersionHelper(String version)
As VersionHelper#VersionHelper(String, String) with "." separator

Parameters:
version -

VersionHelper

public VersionHelper(String version,
                     char separatorCharacter)
As VersionHelper#VersionHelper(String[]) with elements got by splitting string with given character.

Parameters:
version -
separatorCharacter -

VersionHelper

public VersionHelper(String[] versionElements,
                     String separator)
Constructs new helper with given version elements. They are analyzed to know which are responsible for the minor version and for the revision.

Parameters:
versionElements -
Method Detail

setRevision

public void setRevision(String revision)

getRevision

public String getRevision()
Returns:
last revision imprinted in this version or empty string if no revision known

getMinorVersion

public int getMinorVersion()
Returns:
last minor version imprinted in this version or 0 if no minor version known

setMinorVersion

public void setMinorVersion(int newVersion)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2012. All Rights Reserved.