com.g2forge.alexandria.data.relationship.ScalarRelationship Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ax-collection Show documentation
Show all versions of ax-collection Show documentation
Extended collection API, which will evolve to encompass all ADTs.
package com.g2forge.alexandria.data.relationship;
import java.util.function.BiConsumer;
import java.util.function.Function;
public class ScalarRelationship extends ARelationship {
public ScalarRelationship(Function get, BiConsumer set, BiConsumer setRemote) {
super(get, set, setRemote);
}
@Override
protected boolean isInitialized(R field) {
return field != null;
}
@Override
protected void setRemote(R field, L local) {
if (setRemote != null) setRemote.accept(field, local);
}
}