/** * A hash instance for the {@link Validation} type. * * @param ha Hash the failing side of <code>Validation</code>. * @param hb Hash the succeeding side of <code>Validation</code>. * @return A hash instance for the {@link Validation} type. */ public static <A, B> Hash<Validation<A, B>> validationHash(final Hash<A> ha, final Hash<B> hb) { return eitherHash(ha, hb).contramap(Validation.either()); }
@Override public final int hashCode() { return Hash.eitherHash(Hash.<A>anyHash(), Hash.<B>anyHash()).hash(this); }