|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.SIRAPRISE.client.Version
public class Version
Class to denote SIRA_PRISE versions and/or message type versions.
| Field Summary | |
|---|---|
static Version |
ONE_FOUR
|
static Version |
ONE_ONE
|
static Version |
ONE_THREE
|
static Version |
ONE_TWO
|
static Version |
ONE_ZERO
in order to not have to create identical object within each message type |
| Constructor Summary | |
|---|---|
Version(int fullVersion)
Creates a Version object from a full numeric version indicator |
|
Version(short majorVersion,
short minorVersion)
Creates a Version object from the given major and minor version numbers. |
|
| Method Summary | |
|---|---|
int |
compareTo(Version o)
|
boolean |
equals(java.lang.Object obj)
|
int |
getFullVersion()
Gets the full numeric indicator of the version value. |
Version |
getLowest(Version otherVersion)
Compares two SIRA_PRISE Version indicators and returns the lowest (which is the one whose spec can be expected to define the functionality that the two versions have in common). |
short |
getMajorVersion()
Gets The major version |
short |
getMinorVersion()
Gets The minor version |
int |
hashCode()
|
boolean |
isAtLeast(short majorVersion2,
short minorVersion2)
Checks whether this version indicates a version that is at least (i.e the same, or later than) the one indicated by the given arguments |
boolean |
isAtLeast(Version otherVersion)
Checks whether this version indicates a version that is at least (i.e the same, or later than) the one indicated by the given arguments |
boolean |
isBefore(short majorVersion2,
short minorVersion2)
Checks whether this version indicates an earlier version than the one indicated by the given arguments |
boolean |
isBefore(Version otherVersion)
Checks if this Version object designates an earlier version than the other one |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Version ONE_FOUR
public static final Version ONE_ONE
public static final Version ONE_THREE
public static final Version ONE_TWO
public static final Version ONE_ZERO
| Constructor Detail |
|---|
public Version(int fullVersion)
fullVersion - A full numeric version indicator holding the major version number in its first two bytes and the minor version in its last two bytes.
public Version(short majorVersion,
short minorVersion)
majorVersion - The major versionminorVersion - | Method Detail |
|---|
public final int compareTo(Version o)
compareTo in interface java.lang.Comparable<Version>public final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final int getFullVersion()
public final Version getLowest(Version otherVersion)
otherVersion - the other SIRA_PRISE Version indicator
public final short getMajorVersion()
public final short getMinorVersion()
public final int hashCode()
hashCode in class java.lang.Object
public final boolean isAtLeast(short majorVersion2,
short minorVersion2)
majorVersion2 - The major version number to which this version is to be comparedminorVersion2 - The minor version number to which this version is to be compared
public final boolean isAtLeast(Version otherVersion)
otherVersion - A Version object designating another SIRA_PRISE version this one is to be compared to.
public final boolean isBefore(short majorVersion2,
short minorVersion2)
majorVersion2 - The major version number to which this version is to be comparedminorVersion2 - The minor version number to which this version is to be compared
public final boolean isBefore(Version otherVersion)
otherVersion - A Version object designating another SIRA_PRISE version this one is to be compared to for "earlierness".
public final java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||