org.axway.grapes.server.core.version
Class Version

java.lang.Object
  extended by org.axway.grapes.server.core.version.Version

public class Version
extends Object

Version Model Class

Author:
jdcoffre

Constructor Summary
Version(String version)
           
 
Method Summary
 int compare(Version other)
          Compare two versions
 Boolean isBranch()
          Check if a version is a branch version
 Boolean isRelease()
          Check if a version is a release version
 Boolean isSnapshot()
          Check if a version is a snapshot
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Version

public Version(String version)
        throws NotHandledVersionException
Throws:
NotHandledVersionException
Method Detail

isSnapshot

public Boolean isSnapshot()
Check if a version is a snapshot

Returns:
true if the version is a snapshot

isRelease

public Boolean isRelease()
Check if a version is a release version

Returns:
true if the version is a release

isBranch

public Boolean isBranch()
Check if a version is a branch version

Returns:
true if the version is a branch version

compare

public int compare(Version other)
            throws IncomparableException
Compare two versions

Parameters:
other -
Returns:
an integer: 0 if equals, -1 if older, 1 if newer
Throws:
IncomparableException - is thrown when two versions are not coparable

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014. All Rights Reserved.