com.sun.n1.sps.model
Interface VersionNumber

All Superinterfaces:
java.lang.Comparable

public interface VersionNumber
extends java.lang.Comparable

Wrapper object which encapsulates the information used to distinguish different versions of an object.


Method Summary
 int compareTo(java.lang.Object o)
          Compares this object with the specified object for order.
 boolean equals(java.lang.Object inVersionNumber)
          Returns true if the supplied object is equal to this object.
 java.lang.String getAsString()
          Returns a string representation of the version number.
 short getMajorNumber()
          Returns the major version number.
 short getMinorNumber()
          Returns the minor version number.
 boolean isGreaterThan(VersionNumber inVersion)
          Returns true if this version object is greater than the supplied version number.
 boolean isLessThan(VersionNumber inVersion)
          Returns true if this version is less than the supplied version.
 

Method Detail

getMajorNumber

short getMajorNumber()
Returns the major version number.

Returns:
The major version number.

getMinorNumber

short getMinorNumber()
Returns the minor version number.

Returns:
The minor version number.

getAsString

java.lang.String getAsString()
Returns a string representation of the version number. The format of the string returned is "major.minor"

Returns:
The string representation of the version number.

isGreaterThan

boolean isGreaterThan(VersionNumber inVersion)
Returns true if this version object is greater than the supplied version number.

Parameters:
inVersion - The version number that should be compared with the version number of this object.
Returns:
true if this object is greater than the supplied object.

isLessThan

boolean isLessThan(VersionNumber inVersion)
Returns true if this version is less than the supplied version.

Parameters:
inVersion - The version number that should be compared with the version number of this object.
Returns:
true if this object is less than the supplied object.

equals

boolean equals(java.lang.Object inVersionNumber)
Returns true if the supplied object is equal to this object.

Overrides:
equals in class java.lang.Object
Parameters:
inVersionNumber - The version number object that should be compared with the version number of this object.
Returns:
true if the supplied object is equal to this object.

compareTo

int compareTo(java.lang.Object o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface java.lang.Comparable
See Also:
Comparable#compareTo(Object)}