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