@Test public void schemaEquality_diffColumnName_notEqual() { FieldBundle bundle = new FieldBundle("foo", "foo", "text", false); FieldBundle copy = new FieldBundle("foo", "foo2", "text", true); assertThat(bundle.isSchemaEqual(copy), is(false)); }
@Override public boolean isSchemaEqual(FieldBundle other) { if (mNonNull != other.mNonNull) return false; if (mColumnName != null ? !mColumnName.equals(other.mColumnName) : other.mColumnName != null) { return false; } return mAffinity != null ? mAffinity.equals(other.mAffinity) : other.mAffinity == null; }
FieldBundle implements SchemaEquality<FieldBundle> { @Override public boolean isSchemaEqual(FieldBundle other) { if (mNonNull != other.mNonNull) return false; if (mColumnName != null ? !mColumnName.equals(other.mColumnName) : other.mColumnName != null) { return false; } return mAffinity != null ? mAffinity.equals(other.mAffinity) : other.mAffinity == null; } }
FieldBundle implements SchemaEquality<FieldBundle> { @Override public boolean isSchemaEqual(FieldBundle other) { if (mNonNull != other.mNonNull) return false; if (mColumnName != null ? !mColumnName.equals(other.mColumnName) : other.mColumnName != null) { return false; } return mAffinity != null ? mAffinity.equals(other.mAffinity) : other.mAffinity == null; } FieldBundle(String fieldPath, String columnName, String affinity, boolean nonNull); }
FieldBundle implements SchemaEquality<FieldBundle> { @Override public boolean isSchemaEqual(FieldBundle other) { if (mNonNull != other.mNonNull) return false; if (mColumnName != null ? !mColumnName.equals(other.mColumnName) : other.mColumnName != null) { return false; } return mAffinity != null ? mAffinity.equals(other.mAffinity) : other.mAffinity == null; } FieldBundle(String fieldPath, String columnName, String affinity, boolean nonNull); String getFieldPath(); String getColumnName(); String getAffinity(); boolean isNonNull(); @Override boolean isSchemaEqual(FieldBundle other); }
FieldBundle implements SchemaEquality<FieldBundle> { @Override public boolean isSchemaEqual(FieldBundle other) { if (mNonNull != other.mNonNull) return false; if (mColumnName != null ? !mColumnName.equals(other.mColumnName) : other.mColumnName != null) { return false; } return mAffinity != null ? mAffinity.equals(other.mAffinity) : other.mAffinity == null; } FieldBundle(String fieldPath, String columnName, String affinity, boolean nonNull); String getFieldPath(); String getColumnName(); String getAffinity(); boolean isNonNull(); @Override boolean isSchemaEqual(FieldBundle other);  }