Package ai.djl.basicdataset.tabular
Class MapFeatures
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String>
-
- ai.djl.basicdataset.tabular.MapFeatures
-
- All Implemented Interfaces:
java.io.Serializable,java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String>,java.util.Map<java.lang.String,java.lang.String>
public class MapFeatures extends java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String>An extension of theConcurrentHashMapfor use in theTabularTranslator.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap
java.util.concurrent.ConcurrentHashMap.KeySetView<K extends java.lang.Object,V extends java.lang.Object>
-
-
Constructor Summary
Constructors Constructor Description MapFeatures()Constructs aMapFeaturesinstance.MapFeatures(int initialCapacity)Constructs aMapFeaturesinstance.MapFeatures(int initialCapacity, float loadFactor)Constructs aMapFeaturesinstance.MapFeatures(int initialCapacity, float loadFactor, int concurrencyLevel)Constructs aMapFeatures.MapFeatures(java.util.Map<? extends java.lang.String,? extends java.lang.String> m)Constructs aMapFeaturesinstance.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MapFeaturesfromMap(java.util.Map<java.lang.String,java.lang.String> source)Creates aMapFeaturesfrom a source list.-
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
-
-
-
-
Constructor Detail
-
MapFeatures
public MapFeatures()
Constructs aMapFeaturesinstance.- See Also:
ConcurrentHashMap()
-
MapFeatures
public MapFeatures(int initialCapacity)
Constructs aMapFeaturesinstance.- Parameters:
initialCapacity- The implementation performs internal sizing to accommodate this many elements.- Throws:
java.lang.IllegalArgumentException- if the initial capacity of elements is negative- See Also:
ConcurrentHashMap(int)
-
MapFeatures
public MapFeatures(java.util.Map<? extends java.lang.String,? extends java.lang.String> m)
Constructs aMapFeaturesinstance.- Parameters:
m- the map- See Also:
ConcurrentHashMap(Map)
-
MapFeatures
public MapFeatures(int initialCapacity, float loadFactor)Constructs aMapFeaturesinstance.- Parameters:
initialCapacity- the initial capacity. The implementation performs internal sizing to accommodate this many elements, given the specified load factor.loadFactor- the load factor (table density) for establishing the initial table size- Throws:
java.lang.IllegalArgumentException- if the initial capacity of elements is negative or the load factor is nonpositive- See Also:
ConcurrentHashMap(int, float)
-
MapFeatures
public MapFeatures(int initialCapacity, float loadFactor, int concurrencyLevel)Constructs aMapFeatures.- Parameters:
initialCapacity- the initial capacity. The implementation performs internal sizing to accommodate this many elements, given the specified load factor.loadFactor- the load factor (table density) for establishing the initial table sizeconcurrencyLevel- the estimated number of concurrently updating threads. The implementation may use this value as a sizing hint.- Throws:
java.lang.IllegalArgumentException- if the initial capacity is negative or the load factor or concurrencyLevel are nonpositive- See Also:
ConcurrentHashMap(int, float, int)
-
-
Method Detail
-
fromMap
public static MapFeatures fromMap(java.util.Map<java.lang.String,java.lang.String> source)
Creates aMapFeaturesfrom a source list.- Parameters:
source- the source list- Returns:
- a new
MapFeatures
-
-