public class WritableRawComparableTuple extends Object implements WritableRawComparable, Tuple
Constructor and Description |
---|
WritableRawComparableTuple(Class<?>... classes)
Creates a new instance.
|
WritableRawComparableTuple(WritableRawComparable... objects)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
int |
compareInBytes(byte[] b1,
int o1,
byte[] b2,
int o2)
Compares two objects in bytes.
|
int |
compareTo(WritableRawComparable o) |
boolean |
equals(Object obj) |
Object |
get(int index)
Returns the element in this tuple.
|
int |
getSizeInBytes(byte[] buf,
int offset)
Computes and returns size in bytes.
|
int |
hashCode() |
void |
readFields(DataInput in) |
int |
size()
Returns the number of elements in this tuple.
|
String |
toString() |
void |
write(DataOutput out) |
public WritableRawComparableTuple(Class<?>... classes)
classes
- element classesIllegalArgumentException
- if some parameters were null
public WritableRawComparableTuple(WritableRawComparable... objects)
objects
- elementsIllegalArgumentException
- if some parameters were null
public final int size()
Tuple
public final Object get(int index)
Tuple
public final void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public final void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public final int compareTo(WritableRawComparable o)
compareTo
in interface Comparable<WritableRawComparable>
public final int getSizeInBytes(byte[] buf, int offset) throws IOException
WritableRawComparable
getSizeInBytes
in interface WritableRawComparable
buf
- bytes arrayoffset
- bytes offsetIOException
- if failed to compute sizepublic final int compareInBytes(byte[] b1, int o1, byte[] b2, int o2) throws IOException
WritableRawComparable
compareInBytes
in interface WritableRawComparable
b1
- bytes representation of the first objecto1
- offset of the first objectb2
- bytes representation of the second objecto2
- offset of the second objectIOException
- if failed to comparisonCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.