コード例 #1
0
 /** INTERNAL: Clone the row and its values. */
 public AbstractRecord clone() {
   try {
     AbstractRecord clone = (AbstractRecord) super.clone();
     clone.fields = (Vector) this.fields.clone();
     clone.values = (Vector) this.values.clone();
     return clone;
   } catch (CloneNotSupportedException exception) {
     throw new InternalError();
   }
 }
コード例 #2
0
 /**
  * INTERNAL: Merge the provided row into this row. Existing field values in this row will be
  * replaced with values from the provided row. Fields not in this row will be added from provided
  * row. Values not in provided row will remain in this row.
  */
 public void mergeFrom(AbstractRecord row) {
   for (int index = 0; index < row.size(); ++index) {
     this.put(row.getFields().get(index), row.getValues().get(index));
   }
 }