Package org.apache.flink.table.data
Class GenericMapData
java.lang.Object
org.apache.flink.table.data.GenericMapData
- All Implemented Interfaces:
MapData
An internal data structure representing data of
MapType or MultisetType.
GenericMapData is a generic implementation of MapData which wraps regular Java
maps.
Note: All keys and values of this data structure must be internal data structures. All keys
must be of the same type; same for values. See RowData for more information about
internal data structures.
Both keys and values can contain null for representing nullability.
-
Constructor Summary
ConstructorsConstructorDescriptionGenericMapData(Map<?, ?> map) Creates an instance ofGenericMapDatausing the given Java map. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value to which the specified key is mapped, ornullif this map contains no mapping for the key.inthashCode()keyArray()Returns an array view of the keys contained in this map.intsize()Returns the number of key-value mappings in this map.Returns an array view of the values contained in this map.
-
Constructor Details
-
GenericMapData
Creates an instance ofGenericMapDatausing the given Java map.Note: All keys and values of the map must be internal data structures.
-
-
Method Details
-
get
Returns the value to which the specified key is mapped, ornullif this map contains no mapping for the key. The returned value is in internal data structure. -
size
public int size()Description copied from interface:MapDataReturns the number of key-value mappings in this map. -
keyArray
Description copied from interface:MapDataReturns an array view of the keys contained in this map.A key-value pair has the same index in the key array and value array.
-
valueArray
Description copied from interface:MapDataReturns an array view of the values contained in this map.A key-value pair has the same index in the key array and value array.
- Specified by:
valueArrayin interfaceMapData
-
equals
-
hashCode
public int hashCode()
-