org.apache.hadoop.hive.serde2
Class CustomNonSettableListObjectInspector1

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.CustomNonSettableListObjectInspector1
All Implemented Interfaces:
Cloneable, ListObjectInspector, ObjectInspector

public class CustomNonSettableListObjectInspector1
extends Object
implements ListObjectInspector


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector
ObjectInspector.Category
 
Constructor Summary
protected CustomNonSettableListObjectInspector1(ObjectInspector listElementObjectInspector)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomNonSettableListObjectInspector1

protected CustomNonSettableListObjectInspector1(ObjectInspector listElementObjectInspector)
Method Detail

getCategory

public final ObjectInspector.Category getCategory()
Description copied from interface: ObjectInspector
An ObjectInspector must inherit from one of the following interfaces if getCategory() returns: PRIMITIVE: PrimitiveObjectInspector LIST: ListObjectInspector MAP: MapObjectInspector STRUCT: StructObjectInspector.

Specified by:
getCategory in interface ObjectInspector

getListElementObjectInspector

public ObjectInspector getListElementObjectInspector()
Specified by:
getListElementObjectInspector in interface ListObjectInspector

getListElement

public Object getListElement(Object data,
                             int index)
Description copied from interface: ListObjectInspector
returns null for null list, out-of-the-range index.

Specified by:
getListElement in interface ListObjectInspector

getListLength

public int getListLength(Object data)
Description copied from interface: ListObjectInspector
returns -1 for data = null.

Specified by:
getListLength in interface ListObjectInspector

getList

public List<?> getList(Object data)
Description copied from interface: ListObjectInspector
returns null for data = null. Note: This method should not return a List object that is reused by the same ListObjectInspector, because it's possible that the same ListObjectInspector will be used in multiple places in the code. However it's OK if the List object is part of the Object data.

Specified by:
getList in interface ListObjectInspector

getTypeName

public String getTypeName()
Description copied from interface: ObjectInspector
Returns the name of the data type that is inspected by this ObjectInspector. This is used to display the type information to the user. For primitive types, the type name is standardized. For other types, the type name can be something like "list", "map", java class names, or user-defined type names similar to typedef.

Specified by:
getTypeName in interface ObjectInspector


Copyright © 2012 The Apache Software Foundation