public class StandardListObjectInspector extends Object implements SettableListObjectInspector
ObjectInspector.Category
Modifier | Constructor and Description |
---|---|
protected |
StandardListObjectInspector() |
protected |
StandardListObjectInspector(ObjectInspector listElementObjectInspector)
Call ObjectInspectorFactory.getStandardListObjectInspector instead.
|
Modifier and Type | Method and Description |
---|---|
Object |
create(int size)
Create a list with the given size.
|
ObjectInspector.Category |
getCategory()
An ObjectInspector must inherit from one of the following interfaces if
getCategory() returns: PRIMITIVE: PrimitiveObjectInspector LIST:
ListObjectInspector MAP: MapObjectInspector STRUCT: StructObjectInspector.
|
List<?> |
getList(Object data)
returns null for data = null.
|
Object |
getListElement(Object data,
int index)
returns null for null list, out-of-the-range index.
|
ObjectInspector |
getListElementObjectInspector() |
int |
getListLength(Object data)
returns -1 for data = null.
|
String |
getTypeName()
Returns the name of the data type that is inspected by this
ObjectInspector.
|
Object |
resize(Object list,
int newSize)
Resize the list.
|
Object |
set(Object list,
int index,
Object element)
Set the element at index.
|
protected StandardListObjectInspector()
protected StandardListObjectInspector(ObjectInspector listElementObjectInspector)
public final ObjectInspector.Category getCategory()
ObjectInspector
getCategory
in interface ObjectInspector
public ObjectInspector getListElementObjectInspector()
getListElementObjectInspector
in interface ListObjectInspector
public Object getListElement(Object data, int index)
ListObjectInspector
getListElement
in interface ListObjectInspector
public int getListLength(Object data)
ListObjectInspector
getListLength
in interface ListObjectInspector
public List<?> getList(Object data)
ListObjectInspector
getList
in interface ListObjectInspector
public String getTypeName()
ObjectInspector
getTypeName
in interface ObjectInspector
public Object create(int size)
SettableListObjectInspector
create
in interface SettableListObjectInspector
public Object resize(Object list, int newSize)
SettableListObjectInspector
resize
in interface SettableListObjectInspector
public Object set(Object list, int index, Object element)
SettableListObjectInspector
set
in interface SettableListObjectInspector
Copyright © 2019 The Apache Software Foundation. All rights reserved.