|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimpledb.TupleDesc
public class TupleDesc
TupleDesc describes the schema of a tuple.
Constructor Summary | |
---|---|
TupleDesc(Type[] typeAr)
Constructor. |
|
TupleDesc(Type[] typeAr,
java.lang.String[] fieldAr)
Constructor. |
Method Summary | |
---|---|
static TupleDesc |
combine(TupleDesc td1,
TupleDesc td2)
Merge two TupleDescs into one, with td1.numFields + td2.numFields fields, with the first td1.numFields coming from td1 and the remaining from td2. |
boolean |
equals(java.lang.Object o)
Compares the specified object with this TupleDesc for equality. |
java.lang.String |
getFieldName(int i)
Gets the (possibly null) field name of the ith field of this TupleDesc. |
int |
getSize()
|
Type |
getType(int i)
Gets the type of the ith field of this TupleDesc. |
int |
hashCode()
|
int |
nameToId(java.lang.String name)
Find the index of the field with a given name. |
int |
numFields()
|
java.lang.String |
toString()
Returns a String describing this descriptor. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TupleDesc(Type[] typeAr, java.lang.String[] fieldAr)
typeAr
- array specifying the number of and types of fields in
this TupleDesc. It must contain at least one entry.fieldAr
- array specifying the names of the fields. Note that names may be null.public TupleDesc(Type[] typeAr)
typeAr
- array specifying the number of and types of fields in
this TupleDesc. It must contain at least one entry.Method Detail |
---|
public static TupleDesc combine(TupleDesc td1, TupleDesc td2)
td1
- The TupleDesc with the first fields of the new TupleDesctd2
- The TupleDesc with the last fields of the TupleDesc
public int numFields()
public java.lang.String getFieldName(int i) throws java.util.NoSuchElementException
i
- index of the field name to return. It must be a valid index.
java.util.NoSuchElementException
- if i is not a valid field reference.public int nameToId(java.lang.String name) throws java.util.NoSuchElementException
name
- name of the field.
java.util.NoSuchElementException
- if no field with a matching name is found.public Type getType(int i) throws java.util.NoSuchElementException
i
- The index of the field to get the type of. It must be a valid index.
java.util.NoSuchElementException
- if i is not a valid field reference.public int getSize()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the Object to be compared for equality with this TupleDesc.
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |