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 MapObjectInspectorpublic ObjectInspector getMapValueObjectInspector()
getMapValueObjectInspector in interface MapObjectInspectorpublic Object getMapValueElement(Object data, Object key)
getMapValueElement in interface MapObjectInspectorpublic int getMapSize(Object data)
MapObjectInspectorgetMapSize in interface MapObjectInspectorpublic Map<?,?> getMap(Object data)
MapObjectInspectorgetMap in interface MapObjectInspectorpublic final ObjectInspector.Category getCategory()
ObjectInspectorgetCategory in interface ObjectInspectorpublic String getTypeName()
ObjectInspectorgetTypeName in interface ObjectInspectorpublic Object create()
SettableMapObjectInspectorcreate in interface SettableMapObjectInspectorpublic Object clear(Object map)
SettableMapObjectInspectorclear in interface SettableMapObjectInspectorpublic Object put(Object map, Object key, Object value)
SettableMapObjectInspectorput in interface SettableMapObjectInspectorpublic Object remove(Object map, Object key)
SettableMapObjectInspectorremove in interface SettableMapObjectInspectorCopyright © 2017 The Apache Software Foundation. All rights reserved.