@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new Warning("a", "b"), new Warning("a", "b")) .addEqualityGroup(new Warning("a", null)) .addEqualityGroup(new Warning("a", "c")) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } else if (!(o instanceof Warning)) { return false; } Warning w = (Warning) o; return _text.equals(w._text) && Objects.equals(_tag, w._tag); }
Warning implements Serializable, Comparable<Warning> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } else if (!(o instanceof Warning)) { return false; } Warning w = (Warning) o; return _text.equals(w._text) && Objects.equals(_tag, w._tag); } }
Warning implements Serializable, Comparable<Warning> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } else if (!(o instanceof Warning)) { return false; } Warning w = (Warning) o; return _text.equals(w._text) && Objects.equals(_tag, w._tag); } Warning(String text, @Nullable String tag); }
Warning implements Serializable, Comparable<Warning> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } else if (!(o instanceof Warning)) { return false; } Warning w = (Warning) o; return _text.equals(w._text) && Objects.equals(_tag, w._tag); } Warning(String text, @Nullable String tag); @JsonProperty(PROP_TAG) @Nullable String getTag(); @JsonProperty(PROP_TEXT) @Nonnull String getText(); @Override int compareTo(Warning o); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override String toString(); }
Warning implements Serializable, Comparable<Warning> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } else if (!(o instanceof Warning)) { return false; } Warning w = (Warning) o; return _text.equals(w._text) && Objects.equals(_tag, w._tag); } Warning(String text, @Nullable String tag); @JsonProperty(PROP_TAG) @Nullable String getTag(); @JsonProperty(PROP_TEXT) @Nonnull String getText(); @Override int compareTo(Warning o); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override String toString();  }