terp - the Codemesh Modular
Template Interpreter v1.3.304

com.codemesh.terp.data
Interface Version

All Superinterfaces:
java.lang.Comparable<Version>, java.io.Serializable
All Known Implementing Classes:
VersionImpl, VersionMatcher

public interface Version
extends java.lang.Comparable<Version>, java.io.Serializable

An interface for maintaining version numbers.


Field Summary
static int UNDEFINED
          An undefined version number has this value.
 
Method Summary
 int getBuild()
          Returns the build version number.
 Version getLessSpecific()
          A factory method that returns a less specific version than the version it is invoked upon.
 int getMajor()
          Returns the major version number.
 int getMinor()
          Returns the minor version number.
 int getPatch()
          Returns the patch version number.
 java.lang.String getPrefix()
          Returns the version number's prefix string.
 java.lang.String getSuffix()
          Returns the version suffix.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

UNDEFINED

static final int UNDEFINED
An undefined version number has this value.

See Also:
Constant Field Values
Method Detail

getPrefix

java.lang.String getPrefix()
Returns the version number's prefix string. Some version numbers contain a non-numeric prefix, for example HP-UX versions like 'B.11.11'. In this case, the prefix would be 'B.'.

Returns:
the version's prefix, normally the empty string.

getMajor

int getMajor()
Returns the major version number.

Returns:
the major version.

getMinor

int getMinor()
Returns the minor version number.

Returns:
the minor version.

getPatch

int getPatch()
Returns the patch version number.

Returns:
the patch version.

getBuild

int getBuild()
Returns the build version number.

Returns:
the build version.

getSuffix

java.lang.String getSuffix()
Returns the version suffix.

Returns:
the version suffix.

getLessSpecific

Version getLessSpecific()
A factory method that returns a less specific version than the version it is invoked upon. For example, if the receiving version is '1.1.5', the less specific version will be '1.1'. When there is no less specific version, null is returned.

Returns:
a less specific version than this version or null if there is no less specific version.

terp - the Codemesh Modular
Template Interpreter v1.3.304

Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.