public static final class Utils.Version extends java.lang.Object implements java.lang.Comparable<Utils.Version>
Constructor and Description |
---|
Utils.Version(java.io.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(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 Utils.Version(java.io.DataInput in) throws java.io.IOException
in
- input streamjava.io.IOException
public Utils.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
public int getMajor()
public int getMinor()
public static int size()
public java.lang.String toString()
toString
in class java.lang.Object
public 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.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2007-2012 The Apache Software Foundation