public class StandardMapObjectInspector extends java.lang.Object implements SettableMapObjectInspector
ObjectInspector.Category
Modifier | Constructor and Description |
---|---|
protected |
StandardMapObjectInspector(ObjectInspector mapKeyObjectInspector,
ObjectInspector mapValueObjectInspector)
Call ObjectInspectorFactory.getStandardMapObjectInspector instead.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clear(java.lang.Object map)
Clear the map.
|
java.lang.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.
|
java.util.Map<?,?> |
getMap(java.lang.Object data)
returns null for data = null.
|
ObjectInspector |
getMapKeyObjectInspector() |
int |
getMapSize(java.lang.Object data)
returns -1 for NULL map.
|
java.lang.Object |
getMapValueElement(java.lang.Object data,
java.lang.Object key) |
ObjectInspector |
getMapValueObjectInspector() |
java.lang.String |
getTypeName()
Returns the name of the data type that is inspected by this
ObjectInspector.
|
java.lang.Object |
put(java.lang.Object map,
java.lang.Object key,
java.lang.Object value)
Add a key-value pair to the map.
|
java.lang.Object |
remove(java.lang.Object map,
java.lang.Object key)
Remove a key-value pair from the map.
|
protected StandardMapObjectInspector(ObjectInspector mapKeyObjectInspector, ObjectInspector mapValueObjectInspector)
public ObjectInspector getMapKeyObjectInspector()
getMapKeyObjectInspector
in interface MapObjectInspector
public ObjectInspector getMapValueObjectInspector()
getMapValueObjectInspector
in interface MapObjectInspector
public java.lang.Object getMapValueElement(java.lang.Object data, java.lang.Object key)
getMapValueElement
in interface MapObjectInspector
public int getMapSize(java.lang.Object data)
MapObjectInspector
getMapSize
in interface MapObjectInspector
public java.util.Map<?,?> getMap(java.lang.Object data)
MapObjectInspector
getMap
in interface MapObjectInspector
public final ObjectInspector.Category getCategory()
ObjectInspector
getCategory
in interface ObjectInspector
public java.lang.String getTypeName()
ObjectInspector
getTypeName
in interface ObjectInspector
public java.lang.Object create()
SettableMapObjectInspector
create
in interface SettableMapObjectInspector
public java.lang.Object clear(java.lang.Object map)
SettableMapObjectInspector
clear
in interface SettableMapObjectInspector
public java.lang.Object put(java.lang.Object map, java.lang.Object key, java.lang.Object value)
SettableMapObjectInspector
put
in interface SettableMapObjectInspector
public java.lang.Object remove(java.lang.Object map, java.lang.Object key)
SettableMapObjectInspector
remove
in interface SettableMapObjectInspector
Copyright © 2012 The Apache Software Foundation