public class WeightedWritable<T extends org.apache.hadoop.io.WritableComparable> extends org.apache.hadoop.io.GenericWritable implements org.apache.hadoop.io.WritableComparable<WeightedWritable<T>>
| Modifier and Type | Class and Description |
|---|---|
static class |
WeightedWritable.Comparator |
| Modifier and Type | Field and Description |
|---|---|
protected long |
weight |
| Constructor and Description |
|---|
WeightedWritable() |
WeightedWritable(DataInput in) |
WeightedWritable(long weight,
T element) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(WeightedWritable<T> writable) |
boolean |
equals(Object object) |
T |
get() |
protected Class<T>[] |
getTypes() |
long |
getWeight() |
int |
hashCode() |
void |
readFields(DataInput in) |
WeightedWritable<T> |
set(long weight,
T writable) |
String |
toString() |
void |
write(DataOutput out) |
public WeightedWritable()
public WeightedWritable(DataInput in) throws IOException
IOExceptionpublic WeightedWritable(long weight,
T element)
protected Class<T>[] getTypes()
getTypes in class org.apache.hadoop.io.GenericWritablepublic long getWeight()
public T get()
get in class org.apache.hadoop.io.GenericWritablepublic WeightedWritable<T> set(long weight, T writable)
public void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.Writablewrite in class org.apache.hadoop.io.GenericWritableIOExceptionpublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritablereadFields in class org.apache.hadoop.io.GenericWritableIOExceptionpublic int compareTo(WeightedWritable<T> writable)
compareTo in interface Comparable<WeightedWritable<T extends org.apache.hadoop.io.WritableComparable>>public String toString()
toString in class org.apache.hadoop.io.GenericWritableCopyright © 2012–2016. All rights reserved.