Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

openfuture.bugbase.model
Class VersionLabel  view VersionLabel download VersionLabel.java

java.lang.Object
  extended byopenfuture.bugbase.model.VersionLabel
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class VersionLabel
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Versions label with three levels: major version, minor version and build. Created: Tue Apr 25 20:52:08 2000

Version:
$Revision: 1.3 $

Field Summary
private  int build
           
private  int majorVersion
           
private  int minorVersion
           
 
Constructor Summary
VersionLabel()
          Constructs a version 0.0.0.
VersionLabel(java.lang.String version)
          Creates a new version and calls set(java.lang.String) 55 .
 
Method Summary
 int compareTo(java.lang.Object other)
          Compares this with another object (total ordering).
 int getBuild()
          Get the value of build.
 int getMajorVersion()
          Get the value of majorVersion.
 int getMinorVersion()
          Get the value of minorVersion.
 void set(java.lang.String version)
          Sets version number.
 void setBuild(int v)
          Set the value of build.
 void setMajorVersion(int v)
          Set the value of majorVersion.
 void setMinorVersion(int v)
          Set the value of minorVersion.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

majorVersion

private int majorVersion

minorVersion

private int minorVersion

build

private int build
Constructor Detail

VersionLabel

public VersionLabel()
Constructs a version 0.0.0.


VersionLabel

public VersionLabel(java.lang.String version)
Creates a new version and calls set(java.lang.String) 55 .

Method Detail

getMajorVersion

public int getMajorVersion()
Get the value of majorVersion.


setMajorVersion

public void setMajorVersion(int v)
Set the value of majorVersion.


getMinorVersion

public int getMinorVersion()
Get the value of minorVersion.


setMinorVersion

public void setMinorVersion(int v)
Set the value of minorVersion.


getBuild

public int getBuild()
Get the value of build.


setBuild

public void setBuild(int v)
Set the value of build.


set

public void set(java.lang.String version)
Sets version number. version must be of the form "xx.yy.zz", where xx is the major version, yy the minor version and zz the build number.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


compareTo

public int compareTo(java.lang.Object other)
Compares this with another object (total ordering).

Specified by:
compareTo in interface java.lang.Comparable