eclipseme.core.model
Class Version

java.lang.Object
  extended byeclipseme.core.model.Version
All Implemented Interfaces:
java.lang.Comparable

public class Version
extends java.lang.Object
implements java.lang.Comparable

Represents the version of a component. Understands a string of the form "major.minor.secondary_patch".

Note: This class/interface is part of an interim API that is still under development and expected to change before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken as the API evolves.

Copyright (c) 2003-2005 Craig Setera
All Rights Reserved.
Licensed under the Eclipse Public License - v 1.0


$Revision: 1.5 $
$Date: 2005/07/07 02:36:56 $

Author:
Craig Setera

Constructor Summary
Version(java.lang.String versionString)
          Construct a new version instance based on the specified version string.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 int compareTo(Version version)
           
 java.lang.String getMajor()
          Get the major version number.
 java.lang.String getMinor()
          Get the minor version number or null if not specified.
 java.lang.String getPatch()
          Get the patch version number or null if not specified.
 java.lang.String getSecondary()
          Get the secondary version number or null if not specified.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Version

public Version(java.lang.String versionString)
Construct a new version instance based on the specified version string.

Method Detail

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable
See Also:
Comparable.compareTo(java.lang.Object)

compareTo

public int compareTo(Version version)
See Also:
Comparable.compareTo(java.lang.Object)

getMajor

public java.lang.String getMajor()
Get the major version number.

Returns:
the major version string

getMinor

public java.lang.String getMinor()
Get the minor version number or null if not specified.

Returns:
the minor version string

getPatch

public java.lang.String getPatch()
Get the patch version number or null if not specified.

Returns:
the patch version string

getSecondary

public java.lang.String getSecondary()
Get the secondary version number or null if not specified.

Returns:
the secondary version string.

toString

public java.lang.String toString()
See Also:
Object.toString()