@Test public void testEquals() throws IOException { final Role role1 = readRole(""); assertThat(role1.equals(readRole("")), is(true)); assertThat(role1.equals(readRole("2")), is(false)); assertThat(role1.equals(readRole("3")), is(false)); }
@Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final Role role = (Role) o; if (!permissions.equals(role.permissions)) return false; return !(getIdentifier() != null ? !getIdentifier().equals(role.getIdentifier()) : role.getIdentifier() != null); }
Role { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final Role role = (Role) o; if (!permissions.equals(role.permissions)) return false; return !(getIdentifier() != null ? !getIdentifier().equals(role.getIdentifier()) : role.getIdentifier() != null); } }
Role { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final Role role = (Role) o; if (!permissions.equals(role.permissions)) return false; return !(getIdentifier() != null ? !getIdentifier().equals(role.getIdentifier()) : role.getIdentifier() != null); } @JsonCreator  Role(@JsonProperty("permissions") final Map<String, Boolean> permissions,
         @JsonProperty("meta") final Meta meta,
         @JsonProperty("links") final Map<String, String> links); }
Role { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final Role role = (Role) o; if (!permissions.equals(role.permissions)) return false; return !(getIdentifier() != null ? !getIdentifier().equals(role.getIdentifier()) : role.getIdentifier() != null); } @JsonCreator  Role(@JsonProperty("permissions") final Map<String, Boolean> permissions,
         @JsonProperty("meta") final Meta meta,
         @JsonProperty("links") final Map<String, String> links); Set<String> getPermissions(); Set<String> getGrantedPermissions(); boolean hasPermissionGranted(final String permission); String getTitle(); String getIdentifier(); void setUri(final String uri); @JsonIgnore String getUri(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); }
Role { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final Role role = (Role) o; if (!permissions.equals(role.permissions)) return false; return !(getIdentifier() != null ? !getIdentifier().equals(role.getIdentifier()) : role.getIdentifier() != null); } @JsonCreator  Role(@JsonProperty("permissions") final Map<String, Boolean> permissions,
         @JsonProperty("meta") final Meta meta,
         @JsonProperty("links") final Map<String, String> links); Set<String> getPermissions(); Set<String> getGrantedPermissions(); boolean hasPermissionGranted(final String permission); String getTitle(); String getIdentifier(); void setUri(final String uri); @JsonIgnore String getUri(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); static final String URI; }