public static final class Utils.Version extends Object implements Comparable<Utils.Version>
构造器和说明 |
---|
Utils.Version(DataInput in)
Construct the Version object by reading from the input stream.
|
Utils.Version(short major,
short minor)
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
int |
compareTo(Utils.Version that)
Compare this version with another version.
|
boolean |
compatibleWith(Utils.Version other)
Test compatibility.
|
boolean |
equals(Object other) |
int |
getMajor()
Get the major version.
|
int |
getMinor()
Get the minor version.
|
int |
hashCode() |
static int |
size()
Get the size of the serialized Version object.
|
String |
toString()
Return a string representation of the version.
|
void |
write(DataOutput out)
Write the objec to a DataOutput.
|
public Utils.Version(DataInput in) throws IOException
in
- input streamIOException
public Utils.Version(short major, short minor)
major
- major version.minor
- minor version.public void write(DataOutput out) throws IOException
out
- The DataOutput object.IOException
public int getMajor()
public int getMinor()
public static int size()
public String toString()
public boolean compatibleWith(Utils.Version other)
other
- The Version object to test compatibility with.public int compareTo(Utils.Version that)
compareTo
在接口中 Comparable<Utils.Version>
Copyright © 2009 The Apache Software Foundation