70 |
/** |
/** |
71 |
* Create the version with the given version numbers. |
* Create the version with the given version numbers. |
72 |
* |
* |
73 |
* @param major major number (0..255) |
* @param _major major number (0..255) |
74 |
* @param minor minor number (0..255) |
* @param _minor minor number (0..255) |
75 |
*/ |
*/ |
76 |
public Version(int _major, int _minor) |
public Version(int _major, int _minor) |
77 |
{ |
{ |
99 |
Version that = (Version) other; |
Version that = (Version) other; |
100 |
return same(that); |
return same(that); |
101 |
} |
} |
102 |
|
|
103 |
|
/** |
104 |
|
* Get the hashcode, higher 8 bits being the major version and lower 8 bits |
105 |
|
* the minor version. |
106 |
|
*/ |
107 |
|
public int hashCode() |
108 |
|
{ |
109 |
|
return major << 8 | minor; |
110 |
|
} |
111 |
|
|
112 |
/** |
/** |
113 |
* Read from the input stream, major number first. |
* Read from the input stream, major number first. |
175 |
* Returs true if the given version is lower or equal to the |
* Returs true if the given version is lower or equal to the |
176 |
* version, specified by the provided minor and major version |
* version, specified by the provided minor and major version |
177 |
* number. This means, the version, specified by these two numbers, |
* number. This means, the version, specified by these two numbers, |
178 |
* should be supported by teh current version. |
* should be supported by the current version. |
179 |
* |
* |
180 |
* @param a_major a major version number. |
* @param a_major a major version number. |
181 |
* @param a_minor a minor version number. |
* @param a_minor a minor version number. |
212 |
throw new MARSHAL("IOException while writing message header"); |
throw new MARSHAL("IOException while writing message header"); |
213 |
} |
} |
214 |
} |
} |
215 |
|
|
216 |
} |
} |