Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- ConnectionTO that = (ConnectionTO) o;
- if (isEventsTab() != that.isEventsTab()) return false;
- if (!getUserId().equals(that.getUserId())) return false;
- return getSessionId().equals(that.getSessionId());
- }
- @Override
- public int hashCode() {
- int result = getUserId().hashCode();
- result = 31 * result + getSessionId().hashCode();
- result = 31 * result + (isEventsTab() ? 1 : 0);
- return result;
- }
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- ConnectionTO that = (ConnectionTO) o;
- return new EqualsBuilder()
- .append(isEventsTab(), that.isEventsTab())
- .append(getUserId(), that.getUserId())
- .append(getSessionId(), that.getSessionId())
- .isEquals();
- }
- @Override
- public int hashCode() {
- return new HashCodeBuilder(17, 37)
- .append(getUserId())
- .append(getSessionId())
- .append(isEventsTab())
- .toHashCode();
- }
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- ConnectionTO that = (ConnectionTO) o;
- return new EqualsBuilder()
- .append(isEventsTab(), that.isEventsTab())
- .append(getUserId(), that.getUserId())
- .append(getSessionId(), that.getSessionId())
- .isEquals();
- }
- @Override
- public int hashCode() {
- return new HashCodeBuilder(17, 37)
- .append(getUserId())
- .append(getSessionId())
- .append(isEventsTab())
- .toHashCode();
- }
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- ConnectionTO that = (ConnectionTO) o;
- return isEventsTab() == that.isEventsTab() &&
- Objects.equal(getUserId(), that.getUserId()) &&
- Objects.equal(getSessionId(), that.getSessionId());
- }
- @Override
- public int hashCode() {
- return Objects.hashCode(getUserId(), getSessionId(), isEventsTab());
- }
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- ConnectionTO that = (ConnectionTO) o;
- return isEventsTab() == that.isEventsTab() &&
- Objects.equals(getUserId(), that.getUserId()) &&
- Objects.equals(getSessionId(), that.getSessionId());
- }
- @Override
- public int hashCode() {
- return Objects.hash(getUserId(), getSessionId(), isEventsTab());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement