@Override public Properties<T> properties() { return delegate.properties(); }
@Override public Properties<T> properties() { return delegate.properties(); }
@Override public ValidatingRekord<T> merge(FixedRekord<T> other) { ValidatingRekord<T> result = this; for (Property<T, ?> property : other.properties()) { result = result.with(property); } return result; }
public static <T> int hashCode(FixedRekord<T> rekord) { return Objects.hash(rekord.name(), rekord.properties()); } }
@Override public Rekord<T> merge(FixedRekord<T> other) { Rekord<T> result = this; for (Property<T, ?> property : other.properties()) { result = result.with(property); } return result; }
public static <T> boolean equals(FixedRekord<T> a, Object bObject) { if (a == bObject) { return true; } if (!(bObject instanceof FixedRekord)) { return false; } @SuppressWarnings("unchecked") FixedRekord<T> b = (FixedRekord<T>) bObject; return a.name().equals(b.name()) && a.properties().equals(b.properties()); }
public <A, E extends Exception> A into(Serializer.Accumulator<A, E> accumulator) throws E { for (Property<T, ?> property : rekord.properties()) { @SuppressWarnings("unchecked") Key<T, Object> castKey = (Key<T, Object>) property.key(); Object value = property.value(); castKey.accumulate(value, accumulator); } return accumulator.result(); } }