edu.umd.cloud9.io.map
Class HMapIVW<V extends WritableComparable<?>>

java.lang.Object
  extended by edu.umd.cloud9.util.map.HMapIV<V>
      extended by edu.umd.cloud9.io.map.HMapIVW<V>
Type Parameters:
V - type of value
All Implemented Interfaces:
MapIV<V>, Serializable, Cloneable, Writable

public class HMapIVW<V extends WritableComparable<?>>
extends HMapIV<V>
implements Writable

Writable representing a map from ints to values of arbitrary WritableComparable.

Author:
Jimmy Lin
See Also:
Serialized Form

Constructor Summary
HMapIVW()
          Creates a HMapIVW object.
 
Method Summary
static
<T extends WritableComparable<?>>
HMapIVW<T>
create(byte[] bytes)
          Creates a HMapIVW object from a byte array.
static
<T extends WritableComparable<?>>
HMapIVW<T>
create(DataInput in)
          Creates a HMapIVW object from a DataInput.
 void readFields(DataInput in)
          Deserializes the map.
 byte[] serialize()
          Returns the serialized representation of this object as a byte array.
 void write(DataOutput out)
          Serializes the map.
 
Methods inherited from class edu.umd.cloud9.util.map.HMapIV
clear, clone, containsKey, containsValue, entrySet, get, getEntriesSortedByValue, getEntriesSortedByValue, isEmpty, keySet, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.umd.cloud9.util.map.MapIV
equals, hashCode
 

Constructor Detail

HMapIVW

public HMapIVW()
Creates a HMapIVW object.

Method Detail

readFields

public void readFields(DataInput in)
                throws IOException
Deserializes the map.

Specified by:
readFields in interface Writable
Parameters:
in - source for raw byte representation
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Serializes the map.

Specified by:
write in interface Writable
Parameters:
out - where to write the raw byte representation
Throws:
IOException

serialize

public byte[] serialize()
                 throws IOException
Returns the serialized representation of this object as a byte array.

Returns:
byte array representing the serialized representation of this object
Throws:
IOException

create

public static <T extends WritableComparable<?>> HMapIVW<T> create(DataInput in)
                                                       throws IOException
Creates a HMapIVW object from a DataInput.

Parameters:
in - source for reading the serialized representation
Returns:
a newly-created HMapIVW object
Throws:
IOException

create

public static <T extends WritableComparable<?>> HMapIVW<T> create(byte[] bytes)
                                                       throws IOException
Creates a HMapIVW object from a byte array.

Parameters:
bytes - source for reading the serialized representation
Returns:
a newly-created HMapIVW object
Throws:
IOException