Skip to content

Instantly share code, notes, and snippets.

@drewcsillag
Last active December 7, 2016 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drewcsillag/309cf9cad1a5f69c7b60d8cd43abdcd5 to your computer and use it in GitHub Desktop.
Save drewcsillag/309cf9cad1a5f69c7b60d8cd43abdcd5 to your computer and use it in GitHub Desktop.
More generalized isEqual
final IsEqual<Boolean> passwordCheckIsEqual = new IsEqual<Boolean>() {
@Override
public boolean apply(final Boolean control, final Boolean experiment) {
final List<String> mismatches = new ArrayList<>();
final IsEqualUtil.MismatchConsumer consumer = IsEqualUtil.consumeToList(
mismatches);
final boolean success = checkNullity(control, experiment, consumer)
&& startCompare(consumer)
.dotEquals(control, experiment, "checkmatches")
.get();
if (success) {
return true;
}
/// send mismatch data to Kafka
return false;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment