public class String2IntOpenHashMapWritable extends it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<String> implements org.apache.hadoop.io.Writable
it.unimi.dsi.fastutil.objects.AbstractObject2IntMap.BasicEntry<K>| Constructor and Description |
|---|
String2IntOpenHashMapWritable()
Creates a
String2IntOpenHashMapWritable object. |
| Modifier and Type | Method and Description |
|---|---|
static String2IntOpenHashMapWritable |
create(byte[] bytes)
Creates object from serialized representation.
|
static String2IntOpenHashMapWritable |
create(DataInput in)
Creates object from serialized representation.
|
int |
dot(String2IntOpenHashMapWritable m)
Computes the dot product of this map with another map.
|
void |
increment(String key)
Increments the key.
|
void |
increment(String key,
int n)
Increments the key.
|
void |
plus(String2IntOpenHashMapWritable m)
Adds values of keys from another map to this map.
|
void |
readFields(DataInput in)
Deserializes this object.
|
byte[] |
serialize()
Serializes this object to a byte array.
|
void |
write(DataOutput out)
Serializes this object.
|
add, addTo, clear, clone, containsKey, containsValue, getInt, growthFactor, growthFactor, hashCode, isEmpty, keySet, object2IntEntrySet, put, put, rehash, rehash, remove, removeInt, shiftKeys, size, trim, trim, valuescontainsValue, entrySet, equals, putAll, toStringdefaultReturnValue, defaultReturnValue, getfinalize, getClass, notify, notifyAll, wait, wait, waitdefaultReturnValue, defaultReturnValuecompute, computeIfAbsent, computeIfPresent, forEach, get, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic String2IntOpenHashMapWritable()
String2IntOpenHashMapWritable object.public void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.Writablein - source for raw byte representationIOExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.Writableout - where to write the raw byte representationIOExceptionpublic byte[] serialize()
throws IOException
IOExceptionpublic static String2IntOpenHashMapWritable create(DataInput in) throws IOException
in - source of serialized representationIOExceptionpublic static String2IntOpenHashMapWritable create(byte[] bytes) throws IOException
IOExceptionpublic void plus(String2IntOpenHashMapWritable m)
m - the other mappublic int dot(String2IntOpenHashMapWritable m)
m - the other mappublic void increment(String key)
key - key to incrementpublic void increment(String key, int n)
key - key to incrementn - amount to incrementCopyright © 2018. All rights reserved.