@Test public void shouldNotBeCompatibleWithMissingFields () { targetSchemaBuilder.addField( "field1", Integer.class ); final PortRuntimeSchema sourceSchema = sourceSchemaBuilder.build(); final PortRuntimeSchema targetSchema = targetSchemaBuilder.build(); assertFalse( sourceSchema.isCompatibleWith( targetSchema ) ); }
public boolean isCompatibleWith ( final PortRuntimeSchema other ) { for ( RuntimeSchemaField otherField : other.getFields() ) { boolean match = false; for ( RuntimeSchemaField thisField : this.fields ) { if ( thisField.isCompatibleWith( otherField ) ) { match = true; break; } } if ( !match ) { return false; } } return true; }
PortRuntimeSchema implements TupleSchema { public boolean isCompatibleWith ( final PortRuntimeSchema other ) { for ( RuntimeSchemaField otherField : other.getFields() ) { boolean match = false; for ( RuntimeSchemaField thisField : this.fields ) { if ( thisField.isCompatibleWith( otherField ) ) { match = true; break; } } if ( !match ) { return false; } } return true; } }
PortRuntimeSchema implements TupleSchema { public boolean isCompatibleWith ( final PortRuntimeSchema other ) { for ( RuntimeSchemaField otherField : other.getFields() ) { boolean match = false; for ( RuntimeSchemaField thisField : this.fields ) { if ( thisField.isCompatibleWith( otherField ) ) { match = true; break; } } if ( !match ) { return false; } } return true; } PortRuntimeSchema( final List<RuntimeSchemaField> fields ); }
PortRuntimeSchema implements TupleSchema { public boolean isCompatibleWith ( final PortRuntimeSchema other ) { for ( RuntimeSchemaField otherField : other.getFields() ) { boolean match = false; for ( RuntimeSchemaField thisField : this.fields ) { if ( thisField.isCompatibleWith( otherField ) ) { match = true; break; } } if ( !match ) { return false; } } return true; } PortRuntimeSchema( final List<RuntimeSchemaField> fields ); @Override int getFieldCount(); @Override List<RuntimeSchemaField> getFields(); @Override int getFieldIndex( final String fieldName ); @Override String getFieldAt( final int fieldIndex ); RuntimeSchemaField getField( final String fieldName ); boolean isCompatibleWith( final PortRuntimeSchema other ); @Override String toString(); }
PortRuntimeSchema implements TupleSchema { public boolean isCompatibleWith ( final PortRuntimeSchema other ) { for ( RuntimeSchemaField otherField : other.getFields() ) { boolean match = false; for ( RuntimeSchemaField thisField : this.fields ) { if ( thisField.isCompatibleWith( otherField ) ) { match = true; break; } } if ( !match ) { return false; } } return true; } PortRuntimeSchema( final List<RuntimeSchemaField> fields ); @Override int getFieldCount(); @Override List<RuntimeSchemaField> getFields(); @Override int getFieldIndex( final String fieldName ); @Override String getFieldAt( final int fieldIndex ); RuntimeSchemaField getField( final String fieldName ); boolean isCompatibleWith( final PortRuntimeSchema other ); @Override String toString();  }