P
- The class of the object contained in the set. Must implement Writable.public abstract class SetWritable<P extends org.apache.hadoop.io.Writable>
extends java.lang.Object
implements org.apache.hadoop.io.Writable
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<P> |
internalState |
Constructor and Description |
---|
SetWritable() |
Modifier and Type | Method and Description |
---|---|
void |
addAll(java.util.Collection<P> it) |
void |
addElement(P element) |
boolean |
contains(org.apache.hadoop.io.Writable key) |
java.util.Set<P> |
get() |
java.util.Iterator<? extends org.apache.hadoop.io.Writable> |
iterator() |
void |
readFields(java.io.DataInput in) |
boolean |
remove(org.apache.hadoop.io.Writable elementToRemove) |
void |
reset() |
int |
size() |
protected abstract P |
specificRead(java.io.DataInput in)
This method is used to let the subclasses properly deserialize the data from the DataInput.
|
void |
write(java.io.DataOutput out) |
protected java.util.Set<P extends org.apache.hadoop.io.Writable> internalState
public void addAll(java.util.Collection<P> it)
public void addElement(P element)
public boolean contains(org.apache.hadoop.io.Writable key)
public java.util.Set<P> get()
public java.util.Iterator<? extends org.apache.hadoop.io.Writable> iterator()
public void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public boolean remove(org.apache.hadoop.io.Writable elementToRemove)
public void reset()
public int size()
protected abstract P specificRead(java.io.DataInput in) throws java.io.IOException
in
- The DataInput object from which read the data.java.io.IOException
public void write(java.io.DataOutput out) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException