public class Version
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
| Constructor and Description |
|---|
Version(int major,
int minor)
Create a new Version instance
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a copy of this object.
|
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order.
|
boolean |
equals(java.lang.Object obj)
Test for equality between two Version objects.
|
int |
getMajor()
Get the major version number.
|
int |
getMinor()
Get the minor version number.
|
int |
hashCode()
Get a hash code based on the major and minor version numbers.
|
java.lang.String |
toString()
Converts this Version object into a printable String.
|
public Version(int major,
int minor)
major - major version number (non-negative integer)minor - minor version number (non-negative integer)public int getMajor()
public int getMinor()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object against which to testpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - the Object to be compared.java.lang.ClassCastException - if the specified object's type prevents it
from being compared to this Object.
The contents of this file are licensed under the Sun Industry Standards Source License version 1.2.
Copyright 2008, Sun Microsystems, Inc.