@Test @DisplayName("support equality") void supportEquality() { new EqualsTester().addEqualityGroup(eitherWithA, EitherOf2.withA(a)) .addEqualityGroup(eitherWithB) .testEquals(); }
public static <A extends Message, B extends Message> EitherOf2<A, B> withA(A a) { checkNotNull(a); EitherOf2<A, B> result = new EitherOf2<>(a, 0); return result; }
EitherOf2 extends Either implements AValue<A>, BValue<B> { public static <A extends Message, B extends Message> EitherOf2<A, B> withA(A a) { checkNotNull(a); EitherOf2<A, B> result = new EitherOf2<>(a, 0); return result; } }
EitherOf2 extends Either implements AValue<A>, BValue<B> { public static <A extends Message, B extends Message> EitherOf2<A, B> withA(A a) { checkNotNull(a); EitherOf2<A, B> result = new EitherOf2<>(a, 0); return result; } private  EitherOf2(Message value, int index); }
EitherOf2 extends Either implements AValue<A>, BValue<B> { public static <A extends Message, B extends Message> EitherOf2<A, B> withA(A a) { checkNotNull(a); EitherOf2<A, B> result = new EitherOf2<>(a, 0); return result; } private  EitherOf2(Message value, int index); static EitherOf2<A, B> withA(A a); static EitherOf2<A, B> withB(B b); @Override A getA(); @Override B getB(); }
EitherOf2 extends Either implements AValue<A>, BValue<B> { public static <A extends Message, B extends Message> EitherOf2<A, B> withA(A a) { checkNotNull(a); EitherOf2<A, B> result = new EitherOf2<>(a, 0); return result; } private  EitherOf2(Message value, int index); static EitherOf2<A, B> withA(A a); static EitherOf2<A, B> withB(B b); @Override A getA(); @Override B getB();  }