Gets the (possibly null) field name of the ith field of this TupleDesc. @param i index of the field name to return. It must be a valid index. @return the name of the ith field @throws NoSuchElementException if i is not a valid field reference.
(int i)
| 126 | * if i is not a valid field reference. |
| 127 | */ |
| 128 | public String getFieldName(int i) throws NoSuchElementException { |
| 129 | // some code goes here |
| 130 | if(i<0 || i>=this.tupleDescList.size()){ |
| 131 | throw new NoSuchElementException(); |
| 132 | } |
| 133 | return this.tupleDescList.get(i).fieldName; |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Gets the type of the ith field of this TupleDesc. |