@Test public void testEqualsAndHash() { EnumConverter converter1 = new EnumConverter<>(RoundingMode.class); EnumConverter converter2 = new EnumConverter<>(RoundingMode.class); EnumConverter converter3 = new EnumConverter<>(TestEnum.class); assertThat(converter1).isEqualTo(converter1); assertThat(converter1).isNotEqualTo(null); assertThat(converter1).isNotEqualTo("aString"); assertThat("aString").isNotEqualTo(converter1); assertThat(converter2).isEqualTo(converter1); assertThat(converter1).isNotEqualTo(converter3); assertThat(converter2.hashCode()).isEqualTo(converter1.hashCode()); assertThat(converter1.hashCode()).isNotEqualTo(converter3.hashCode()); }
@Override public int hashCode() { return Objects.hash(enumType); }
EnumConverter implements PropertyConverter<T> { @Override public int hashCode() { return Objects.hash(enumType); } }
EnumConverter implements PropertyConverter<T> { @Override public int hashCode() { return Objects.hash(enumType); } EnumConverter(Class<T> enumType); }
EnumConverter implements PropertyConverter<T> { @Override public int hashCode() { return Objects.hash(enumType); } EnumConverter(Class<T> enumType); @Override T convert(String value, ConversionContext ctx); @Override boolean equals(Object o); @Override int hashCode(); }
EnumConverter implements PropertyConverter<T> { @Override public int hashCode() { return Objects.hash(enumType); } EnumConverter(Class<T> enumType); @Override T convert(String value, ConversionContext ctx); @Override boolean equals(Object o); @Override int hashCode();  }