@Test public void testEquals() { LineApiError expected = LineApiError.createWithHttpResponseCode(5, "testMessage"); assertTrue(expected.equals(LineApiError.createWithHttpResponseCode(5, "testMessage"))); assertFalse(expected.equals(LineApiError.createWithHttpResponseCode(4, "testMessage"))); assertFalse(expected.equals(LineApiError.createWithHttpResponseCode(5, "testMessage2"))); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof LineApiError)) return false; LineApiError that = (LineApiError) o; return getHttpResponseCode() == that.getHttpResponseCode() && Objects.equals(getMessage(), that.getMessage()) && errorCode == that.errorCode; }
LineApiError implements Parcelable { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof LineApiError)) return false; LineApiError that = (LineApiError) o; return getHttpResponseCode() == that.getHttpResponseCode() && Objects.equals(getMessage(), that.getMessage()) && errorCode == that.errorCode; } }
LineApiError implements Parcelable { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof LineApiError)) return false; LineApiError that = (LineApiError) o; return getHttpResponseCode() == that.getHttpResponseCode() && Objects.equals(getMessage(), that.getMessage()) && errorCode == that.errorCode; } LineApiError(@Nullable Exception e);  LineApiError(@Nullable String message);  LineApiError(@Nullable Exception e, ErrorCode errorCode);  LineApiError(int httpResponseCode, @Nullable String message, ErrorCode errorCode); protected  LineApiError(Parcel in); }
LineApiError implements Parcelable { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof LineApiError)) return false; LineApiError that = (LineApiError) o; return getHttpResponseCode() == that.getHttpResponseCode() && Objects.equals(getMessage(), that.getMessage()) && errorCode == that.errorCode; } LineApiError(@Nullable Exception e);  LineApiError(@Nullable String message);  LineApiError(@Nullable Exception e, ErrorCode errorCode);  LineApiError(int httpResponseCode, @Nullable String message, ErrorCode errorCode); protected  LineApiError(Parcel in); static LineApiError createWithHttpResponseCode(int httpResponseCode, @Nullable String errorString); static LineApiError createWithHttpResponseCode(int httpResponseCode, @Nullable Exception e); @Override void writeToParcel(Parcel dest, int flags); @Override int describeContents(); int getHttpResponseCode(); @Nullable String getMessage(); @NonNull ErrorCode getErrorCode(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
LineApiError implements Parcelable { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof LineApiError)) return false; LineApiError that = (LineApiError) o; return getHttpResponseCode() == that.getHttpResponseCode() && Objects.equals(getMessage(), that.getMessage()) && errorCode == that.errorCode; } LineApiError(@Nullable Exception e);  LineApiError(@Nullable String message);  LineApiError(@Nullable Exception e, ErrorCode errorCode);  LineApiError(int httpResponseCode, @Nullable String message, ErrorCode errorCode); protected  LineApiError(Parcel in); static LineApiError createWithHttpResponseCode(int httpResponseCode, @Nullable String errorString); static LineApiError createWithHttpResponseCode(int httpResponseCode, @Nullable Exception e); @Override void writeToParcel(Parcel dest, int flags); @Override int describeContents(); int getHttpResponseCode(); @Nullable String getMessage(); @NonNull ErrorCode getErrorCode(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final Parcelable.Creator<LineApiError> CREATOR; static final LineApiError DEFAULT; }