hudson.plugins.collabnet.auth
Class CNVersion

java.lang.Object
  extended by hudson.plugins.collabnet.auth.CNVersion
All Implemented Interfaces:
java.lang.Comparable<CNVersion>

public class CNVersion
extends java.lang.Object
implements java.lang.Comparable<CNVersion>

Class to represent and compare CollabNet version numbers.


Constructor Summary
CNVersion(java.lang.String versionString)
           
 
Method Summary
 int compareTo(CNVersion otherVersion)
           
 boolean equals(java.lang.Object obj)
          Override the equals method to ensure that any CNVersion with the same version numbers is equal.
 int hashCode()
          Override hashCode since we're are overriding equals.
 java.lang.String toString()
          Override the toString method to display the parts of the version as a String.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CNVersion

public CNVersion(java.lang.String versionString)
Method Detail

compareTo

public int compareTo(CNVersion otherVersion)
Specified by:
compareTo in interface java.lang.Comparable<CNVersion>
Returns:
negative int, zero, or positive int if this is less than, equal to, or greather than the otherVersion. By "less than", we mean an earlier version. "greater than" would be a later version.
Throws:
java.lang.NullPointerException - if otherVersion is null.

toString

public java.lang.String toString()
Override the toString method to display the parts of the version as a String.

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Override the equals method to ensure that any CNVersion with the same version numbers is equal.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Override hashCode since we're are overriding equals.

Overrides:
hashCode in class java.lang.Object


Copyright © 2010. All Rights Reserved.