@Test public void testClone() { DataSchema dataSchema = new DataSchema(COLUMN_NAMES, COLUMN_DATA_TYPES); DataSchema dataSchemaClone = dataSchema.clone(); Assert.assertEquals(dataSchema, dataSchemaClone); Assert.assertEquals(dataSchema.hashCode(), dataSchemaClone.hashCode()); }
@SuppressWarnings("CloneDoesntCallSuperClone") @Override public DataSchema clone() { return new DataSchema(_columnNames.clone(), _columnDataTypes.clone()); }
DataSchema { @SuppressWarnings("CloneDoesntCallSuperClone") @Override public DataSchema clone() { return new DataSchema(_columnNames.clone(), _columnDataTypes.clone()); } }
DataSchema { @SuppressWarnings("CloneDoesntCallSuperClone") @Override public DataSchema clone() { return new DataSchema(_columnNames.clone(), _columnDataTypes.clone()); } DataSchema(String[] columnNames, ColumnDataType[] columnDataTypes); }
DataSchema { @SuppressWarnings("CloneDoesntCallSuperClone") @Override public DataSchema clone() { return new DataSchema(_columnNames.clone(), _columnDataTypes.clone()); } DataSchema(String[] columnNames, ColumnDataType[] columnDataTypes); int size(); String getColumnName(int index); String[] getColumnNames(); ColumnDataType getColumnDataType(int index); ColumnDataType[] getColumnDataTypes(); boolean isTypeCompatibleWith(DataSchema anotherDataSchema); void upgradeToCover(DataSchema anotherDataSchema); byte[] toBytes(); static DataSchema fromBytes(byte[] buffer); @SuppressWarnings("CloneDoesntCallSuperClone") @Override DataSchema clone(); @Override String toString(); @Override boolean equals(Object anObject); @Override int hashCode(); }
DataSchema { @SuppressWarnings("CloneDoesntCallSuperClone") @Override public DataSchema clone() { return new DataSchema(_columnNames.clone(), _columnDataTypes.clone()); } DataSchema(String[] columnNames, ColumnDataType[] columnDataTypes); int size(); String getColumnName(int index); String[] getColumnNames(); ColumnDataType getColumnDataType(int index); ColumnDataType[] getColumnDataTypes(); boolean isTypeCompatibleWith(DataSchema anotherDataSchema); void upgradeToCover(DataSchema anotherDataSchema); byte[] toBytes(); static DataSchema fromBytes(byte[] buffer); @SuppressWarnings("CloneDoesntCallSuperClone") @Override DataSchema clone(); @Override String toString(); @Override boolean equals(Object anObject); @Override int hashCode();  }