/** * Get the values of the fields as an ArrayList. * * @return The values of the fields as an ArrayList. */ public ArrayList<Object> getFieldsAsList() { if (!parsed) { parse(); } if (cachedList == null) { cachedList = new ArrayList<Object>(fields.length); for (int i = 0; i < fields.length; i++) { cachedList.add(uncheckedGetField(i)); } } else { assert fields.length == cachedList.size(); for (int i = 0; i < fields.length; i++) { cachedList.set(i, uncheckedGetField(i)); } } return cachedList; }
/** * Get one field out of the struct. * * If the field is a primitive field, return the actual object. Otherwise * return the LazyObject. This is because PrimitiveObjectInspector does not * have control over the object used by the user - the user simply directly * use the Object instead of going through Object * PrimitiveObjectInspector.get(Object). * * @param fieldID * The field ID * @return The field as a LazyObject */ public Object getField(int fieldID) { if (!parsed) { parse(); } return uncheckedGetField(fieldID); }
/** * Get the values of the fields as an ArrayList. * * @return The values of the fields as an ArrayList. */ public ArrayList<Object> getFieldsAsList() { if (!parsed) { parse(); } if (cachedList == null) { cachedList = new ArrayList<Object>(fields.length); for (int i = 0; i < fields.length; i++) { cachedList.add(uncheckedGetField(i)); } } else { assert fields.length == cachedList.size(); for (int i = 0; i < fields.length; i++) { cachedList.set(i, uncheckedGetField(i)); } } return cachedList; }
/** * Get the values of the fields as an ArrayList. * * @return The values of the fields as an ArrayList. */ public ArrayList<Object> getFieldsAsList() { if (!parsed) { parse(); } if (cachedList == null) { cachedList = new ArrayList<Object>(fields.length); for (int i = 0; i < fields.length; i++) { cachedList.add(uncheckedGetField(i)); } } else { assert fields.length == cachedList.size(); for (int i = 0; i < fields.length; i++) { cachedList.set(i, uncheckedGetField(i)); } } return cachedList; }
/** * Get the values of the fields as an ArrayList. * * @return The values of the fields as an ArrayList. */ public ArrayList<Object> getFieldsAsList() { if (!parsed) { parse(); } if (cachedList == null) { cachedList = new ArrayList<Object>(fields.length); for (int i = 0; i < fields.length; i++) { cachedList.add(uncheckedGetField(i)); } } else { assert fields.length == cachedList.size(); for (int i = 0; i < fields.length; i++) { cachedList.set(i, uncheckedGetField(i)); } } return cachedList; }
/** * Get the values of the fields as an ArrayList. * * @return The values of the fields as an ArrayList. */ public ArrayList<Object> getFieldsAsList() { if (!parsed) { parse(); } if (cachedList == null) { cachedList = new ArrayList<Object>(fields.length); for (int i = 0; i < fields.length; i++) { cachedList.add(uncheckedGetField(i)); } } else { assert fields.length == cachedList.size(); for (int i = 0; i < fields.length; i++) { cachedList.set(i, uncheckedGetField(i)); } } return cachedList; }
/** * Get one field out of the struct. * * If the field is a primitive field, return the actual object. Otherwise * return the LazyObject. This is because PrimitiveObjectInspector does not * have control over the object used by the user - the user simply directly * use the Object instead of going through Object * PrimitiveObjectInspector.get(Object). * * @param fieldID * The field ID * @return The field as a LazyObject */ public Object getField(int fieldID) { if (!parsed) { parse(); } return uncheckedGetField(fieldID); }
/** * Get the values of the fields as an ArrayList. * * @return The values of the fields as an ArrayList. */ public ArrayList<Object> getFieldsAsList() { if (!parsed) { parse(); } if (cachedList == null) { cachedList = new ArrayList<Object>(); } else { cachedList.clear(); } for (int i = 0; i < fields.length; i++) { cachedList.add(uncheckedGetField(i)); } return cachedList; }
/** * Get one field out of the struct. * * If the field is a primitive field, return the actual object. Otherwise * return the LazyObject. This is because PrimitiveObjectInspector does not * have control over the object used by the user - the user simply directly * use the Object instead of going through Object * PrimitiveObjectInspector.get(Object). * * @param fieldID * The field ID * @return The field as a LazyObject */ public Object getField(int fieldID) { if (!parsed) { parse(); } return uncheckedGetField(fieldID); }
/** * Get one field out of the struct. * * If the field is a primitive field, return the actual object. Otherwise * return the LazyObject. This is because PrimitiveObjectInspector does not * have control over the object used by the user - the user simply directly * use the Object instead of going through Object * PrimitiveObjectInspector.get(Object). * * @param fieldID * The field ID * @return The field as a LazyObject */ public Object getField(int fieldID) { if (!parsed) { parse(); } return uncheckedGetField(fieldID); }
/** * Get one field out of the struct. * * If the field is a primitive field, return the actual object. Otherwise * return the LazyObject. This is because PrimitiveObjectInspector does not * have control over the object used by the user - the user simply directly * use the Object instead of going through Object * PrimitiveObjectInspector.get(Object). * * @param fieldID * The field ID * @return The field as a LazyObject */ public Object getField(int fieldID) { if (!parsed) { parse(); } return uncheckedGetField(fieldID); }
/** * Get one field out of the struct. * * If the field is a primitive field, return the actual object. Otherwise * return the LazyObject. This is because PrimitiveObjectInspector does not * have control over the object used by the user - the user simply directly * use the Object instead of going through Object * PrimitiveObjectInspector.get(Object). * * @param fieldID * The field ID * @return The field as a LazyObject */ public Object getField(int fieldID) { if (!parsed) { parse(); } return uncheckedGetField(fieldID); }