public static final class Utils.Version extends Object implements Comparable<Utils.Version>
Constructor and Description |
---|
Utils.Version(DataInput in)
Construct the Version object by reading from the input stream.
|
Utils.Version(short major,
short minor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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 boolean compatibleWith(Utils.Version other)
other
- The Version object to test compatibility with.public int compareTo(Utils.Version that)
compareTo
in interface Comparable<Utils.Version>
Copyright © 2017 Apache Software Foundation. All Rights Reserved.