Gets the type of the ith field of this TupleDesc. @param i The index of the field to get the type of. It must be a valid index. @return the type of the ith field @throws NoSuchElementException if i is not a valid field reference.
(int i)
| 144 | * if i is not a valid field reference. |
| 145 | */ |
| 146 | public Type getFieldType(int i) throws NoSuchElementException { |
| 147 | // some code goes here |
| 148 | if(i<0 || i>=this.tupleDescList.size()){ |
| 149 | throw new NoSuchElementException(); |
| 150 | } |
| 151 | return this.tupleDescList.get(i).fieldType; |
| 152 | } |
| 153 | |
| 154 | /** |
| 155 | * Find the index of the field with a given name. |