public class StandardMapObjectInspector extends Object implements SettableMapObjectInspector
ObjectInspector.Category
Modifier | Constructor and Description |
---|---|
protected |
StandardMapObjectInspector() |
protected |
StandardMapObjectInspector(ObjectInspector mapKeyObjectInspector,
ObjectInspector mapValueObjectInspector)
Call ObjectInspectorFactory.getStandardMapObjectInspector instead.
|
Modifier and Type | Method and Description |
---|---|
Object |
clear(Object map)
Clear the map.
|
Object |
create()
Create an empty map.
|
ObjectInspector.Category |
getCategory()
An ObjectInspector must inherit from one of the following interfaces if
getCategory() returns: PRIMITIVE: PrimitiveObjectInspector LIST:
ListObjectInspector MAP: MapObjectInspector STRUCT: StructObjectInspector.
|
Map<?,?> |
getMap(Object data)
returns null for data = null.
|
ObjectInspector |
getMapKeyObjectInspector() |
int |
getMapSize(Object data)
returns -1 for NULL map.
|
Object |
getMapValueElement(Object data,
Object key) |
ObjectInspector |
getMapValueObjectInspector() |
String |
getTypeName()
Returns the name of the data type that is inspected by this
ObjectInspector.
|
Object |
put(Object map,
Object key,
Object value)
Add a key-value pair to the map.
|
Object |
remove(Object map,
Object key)
Remove a key-value pair from the map.
|
protected StandardMapObjectInspector()
protected StandardMapObjectInspector(ObjectInspector mapKeyObjectInspector, ObjectInspector mapValueObjectInspector)
public ObjectInspector getMapKeyObjectInspector()
getMapKeyObjectInspector
in interface MapObjectInspector
public ObjectInspector getMapValueObjectInspector()
getMapValueObjectInspector
in interface MapObjectInspector
public Object getMapValueElement(Object data, Object key)
getMapValueElement
in interface MapObjectInspector
public int getMapSize(Object data)
MapObjectInspector
getMapSize
in interface MapObjectInspector
public Map<?,?> getMap(Object data)
MapObjectInspector
getMap
in interface MapObjectInspector
public final ObjectInspector.Category getCategory()
ObjectInspector
getCategory
in interface ObjectInspector
public String getTypeName()
ObjectInspector
getTypeName
in interface ObjectInspector
public Object create()
SettableMapObjectInspector
create
in interface SettableMapObjectInspector
public Object clear(Object map)
SettableMapObjectInspector
clear
in interface SettableMapObjectInspector
public Object put(Object map, Object key, Object value)
SettableMapObjectInspector
put
in interface SettableMapObjectInspector
public Object remove(Object map, Object key)
SettableMapObjectInspector
remove
in interface SettableMapObjectInspector
Copyright © 2017 The Apache Software Foundation. All rights reserved.