terp - the Codemesh Modular
Template Interpreter v1.3.309

com.codemesh.terp.data
Class VersionMatcher

java.lang.Object
  extended by com.codemesh.terp.data.VersionMatcher
All Implemented Interfaces:
Version, java.io.Serializable, java.lang.Comparable<Version>

public class VersionMatcher
extends java.lang.Object
implements Version

A special version type that can be used in matching operations.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.codemesh.terp.data.Version
UNDEFINED
 
Method Summary
 int compareTo(Version o)
           
 boolean equals(java.lang.Object o)
           
 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.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compareTo

public int compareTo(Version o)
Specified by:
compareTo in interface java.lang.Comparable<Version>

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getBuild

public int getBuild()
Description copied from interface: Version
Returns the build version number.

Specified by:
getBuild in interface Version
Returns:
the build version.

getLessSpecific

public Version getLessSpecific()
Description copied from interface: Version
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.

Specified by:
getLessSpecific in interface Version
Returns:
a less specific version than this version or null if there is no less specific version.

getMajor

public int getMajor()
Description copied from interface: Version
Returns the major version number.

Specified by:
getMajor in interface Version
Returns:
the major version.

getMinor

public int getMinor()
Description copied from interface: Version
Returns the minor version number.

Specified by:
getMinor in interface Version
Returns:
the minor version.

getPatch

public int getPatch()
Description copied from interface: Version
Returns the patch version number.

Specified by:
getPatch in interface Version
Returns:
the patch version.

getPrefix

public java.lang.String getPrefix()
Description copied from interface: Version
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.'.

Specified by:
getPrefix in interface Version
Returns:
the version's prefix, normally the empty string.

getSuffix

public java.lang.String getSuffix()
Description copied from interface: Version
Returns the version suffix.

Specified by:
getSuffix in interface Version
Returns:
the version suffix.

terp - the Codemesh Modular
Template Interpreter v1.3.309

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