edu.ucsb.nceas.metacat
Class Version
java.lang.Object
edu.ucsb.nceas.metacat.Version
- All Implemented Interfaces:
- java.lang.Comparable<Version>
- Direct Known Subclasses:
- DBVersion, MetacatVersion
public class Version
- extends java.lang.Object
- implements java.lang.Comparable<Version>
- Author:
- jones
Version represents the current version information for this Metacat instance.
|
Constructor Summary |
Version(java.lang.String versionID)
Create a Version object, setting sub version levels based on the given
version id. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
allowedVersionLevels
protected static int allowedVersionLevels
subversions
protected int[] subversions
versionString
protected java.lang.String versionString
Version
public Version(java.lang.String versionID)
- Create a Version object, setting sub version levels based on the given
version id.
- Parameters:
versionID -
compareTo
public int compareTo(Version anotherVersion)
- Compare this Version object to another. Use the sub version levels to do
the comparison. In that way, we can make sure that something like version
1.0.0.1 is less than 2.0.1.
- Specified by:
compareTo in interface java.lang.Comparable<Version>
- Parameters:
anotherVersion -
- Returns:
- -1 if this version is less than given version, 0 if they are
equal and 1 if this version is greater than given version.
getSubversion
public int getSubversion(int level)
getVersionString
public java.lang.String getVersionString()
Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.