|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.common.net.RPCVersion
Class for keeping track of the RPC protocol version for a given client. The RPCVersion is different from the client or server version, since the client or server may add features that don't require a protocol change.
Field Summary | |
int |
a_
|
int |
b_
|
int |
c_
|
static RPCVersion |
DEFAULT_VERSION
|
static RPCVersion |
TERRAIN_OPTIMIZATION
|
static RPCVersion |
USE_ZLIB
|
Constructor Summary | |
RPCVersion(int a,
int b,
int c)
Constructs a new RPCVersion |
|
RPCVersion(RPCVersion v)
Constructs a new RPCVersion by copying the values from another version. |
|
RPCVersion(java.lang.String version)
Constructs a new RPCVersion |
Method Summary | |
boolean |
equals(RPCVersion x)
Returns true if these two RPCVersions are equal. |
static RPCVersion |
extractVersion(java.lang.String version)
Retrieves the RPC protocol version from the passed version string. |
int |
getMajor()
|
int |
getMinor()
|
int |
getRelease()
|
boolean |
greaterThanOrEqual(RPCVersion lhs)
|
int |
hashCode()
If you override equals(), you have to override hashCode(). |
boolean |
lessThan(RPCVersion lhs)
|
static void |
main(java.lang.String[] args)
Testing function. |
static RPCVersion |
parseVersion(java.lang.String version)
Sets the version from a version string. |
java.lang.String |
toString()
Returns string representation of this version: "a.b.c" |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final RPCVersion DEFAULT_VERSION
public static final RPCVersion TERRAIN_OPTIMIZATION
public static final RPCVersion USE_ZLIB
public int a_
public int b_
public int c_
Constructor Detail |
public RPCVersion(java.lang.String version)
version
- a version string like "2.14.123"public RPCVersion(int a, int b, int c)
a
- majorb
- minorc
- releasepublic RPCVersion(RPCVersion v)
Method Detail |
public static RPCVersion extractVersion(java.lang.String version)
version
- the string passed from the client
public static RPCVersion parseVersion(java.lang.String version)
public java.lang.String toString()
public int getMajor()
public int getMinor()
public int getRelease()
public boolean equals(RPCVersion x)
public int hashCode()
public boolean greaterThanOrEqual(RPCVersion lhs)
public boolean lessThan(RPCVersion lhs)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |