tl.lin.data.map
Class HMapKFW<K extends org.apache.hadoop.io.WritableComparable<?>>

java.lang.Object
  extended by tl.lin.data.map.HMapKF<K>
      extended by tl.lin.data.map.HMapKFW<K>
Type Parameters:
K - type of key
All Implemented Interfaces:
Serializable, Cloneable, org.apache.hadoop.io.Writable, MapKF<K>

public class HMapKFW<K extends org.apache.hadoop.io.WritableComparable<?>>
extends HMapKF<K>
implements org.apache.hadoop.io.Writable

Writable representing a map from keys of arbitrary WritableComparable to floats.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface tl.lin.data.map.MapKF
DEFAULT_VALUE
 
Constructor Summary
HMapKFW()
          Creates a HMapKFW object.
 
Method Summary
static
<T extends org.apache.hadoop.io.WritableComparable<?>>
HMapKFW<T>
create(byte[] bytes)
          Creates a HMapKFW object from a byte array.
static
<T extends org.apache.hadoop.io.WritableComparable<?>>
HMapKFW<T>
create(DataInput in)
          Creates a HMapKFW 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 tl.lin.data.map.HMapKF
clear, clone, containsKey, containsValue, dot, entrySet, get, getEntriesSortedByValue, getEntriesSortedByValue, increment, isEmpty, keySet, length, normalize, plus, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface tl.lin.data.map.MapKF
equals, hashCode
 

Constructor Detail

HMapKFW

public HMapKFW()
Creates a HMapKFW object.

Method Detail

readFields

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

Specified by:
readFields in interface org.apache.hadoop.io.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 org.apache.hadoop.io.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 org.apache.hadoop.io.WritableComparable<?>> HMapKFW<T> create(DataInput in)
                                                                            throws IOException
Creates a HMapKFW object from a DataInput.

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

create

public static <T extends org.apache.hadoop.io.WritableComparable<?>> HMapKFW<T> create(byte[] bytes)
                                                                            throws IOException
Creates a HMapKFW object from a byte array.

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


Copyright © 2013. All Rights Reserved.