java.lang.Comparable<Utils.Version>public static final class Utils.Version extends java.lang.Object implements java.lang.Comparable<Utils.Version>
| Constructor | Description |
|---|---|
Version(short major,
short minor) |
Constructor.
|
Version(java.io.DataInput in) |
Construct the Version object by reading from the input stream.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
compareTo(Utils.Version that) |
Compare this version with another version.
|
boolean |
compatibleWith(Utils.Version other) |
Test compatibility.
|
boolean |
equals(java.lang.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.
|
java.lang.String |
toString() |
Return a string representation of the version.
|
void |
write(java.io.DataOutput out) |
Write the objec to a DataOutput.
|
public Version(java.io.DataInput in)
throws java.io.IOException
in - input streamjava.io.IOException - raised on errors performing I/O.public Version(short major,
short minor)
major - major version.minor - minor version.public void write(java.io.DataOutput out)
throws java.io.IOException
out - The DataOutput object.java.io.IOException - raised on errors performing I/O.public int getMajor()
public int getMinor()
public static int size()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean compatibleWith(Utils.Version other)
other - The Version object to test compatibility with.public int compareTo(Utils.Version that)
compareTo in interface java.lang.Comparable<Utils.Version>public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.