List of usage examples for java.util Objects equals
public static boolean equals(Object a, Object b)
From source file:fi.otavanopisto.restfulptv.client.model.LanguageItem.java
@Override public boolean equals(java.lang.Object o) { if (this == o) { return true; }/*from w w w . j a v a 2s .c om*/ if (o == null || getClass() != o.getClass()) { return false; } LanguageItem languageItem = (LanguageItem) o; return Objects.equals(this.value, languageItem.value) && Objects.equals(this.language, languageItem.language); }
From source file:com.okta.sdk.models.log.LogGeographicalContext.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }/*from ww w .j ava 2s . c o m*/ if (obj == null || !(obj instanceof LogGeographicalContext)) { return false; } final LogGeographicalContext other = (LogGeographicalContext) obj; return Objects.equals(this.city, other.city) && Objects.equals(this.state, other.state) && Objects.equals(this.country, other.country) && Objects.equals(this.postalCode, other.postalCode) && Objects.equals(this.geolocation, other.geolocation); }
From source file:xyz.cloudbans.entities.data.Kick.java
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Kick)) return false; Kick that = (Kick) o;/*w ww .jav a 2 s . c o m*/ return Objects.equals(getId(), that.getId()) && Objects.equals(getIssuer(), that.getIssuer()) && Objects.equals(getReason(), that.getReason()) && Objects.equals(getIssuedAt(), that.getIssuedAt()) && getDelayState() == that.getDelayState(); }
From source file:fr.mycellar.domain.stock.Cellar.java
@Override protected boolean dataEquals(IdentifiedEntity other) { Cellar cellar = (Cellar) other;//from ww w . j av a 2s . co m return Objects.equals(getName(), cellar.getName()) && Objects.equals(getOwner(), cellar.getOwner()); }
From source file:com.autodesk.client.model.Permission.java
@Override public boolean equals(java.lang.Object o) { if (this == o) { return true; }/*from w ww .j av a 2 s . c o m*/ if (o == null || getClass() != o.getClass()) { return false; } Permission permission = (Permission) o; return Objects.equals(this.authId, permission.authId) && Objects.equals(this.access, permission.access); }
From source file:com.eyem.entity.Grupo.java
@Override public boolean equals(Object obj) { if (obj == null) { return false; }/*w ww . ja va 2 s. c o m*/ if (getClass() != obj.getClass()) { return false; } final Grupo other = (Grupo) obj; if (!Objects.equals(this.idGrupo, other.idGrupo)) { return false; } if (!Objects.equals(this.nombreGrupo, other.nombreGrupo)) { return false; } if (!Objects.equals(this.creador, other.creador)) { return false; } if (!Objects.equals(this.listaUsuarios, other.listaUsuarios)) { return false; } return true; }
From source file:com.cloud.agent.api.guru.ReserveVmInterfaceVspCommand.java
@Override public boolean equals(Object o) { if (this == o) { return true; }/* ww w .jav a 2 s. c o m*/ if (!(o instanceof ReserveVmInterfaceVspCommand)) { return false; } ReserveVmInterfaceVspCommand that = (ReserveVmInterfaceVspCommand) o; return super.equals(that) && Objects.equals(_network, that._network) && Objects.equals(_nic, that._nic) && Objects.equals(_dhcpOption, that._dhcpOption) && Objects.equals(_staticNat, that._staticNat) && Objects.equals(_vm, that._vm); }
From source file:fr.mycellar.domain.stock.Stock.java
@Override protected boolean dataEquals(IdentifiedEntity other) { Stock stock = (Stock) other; return Objects.equals(getBottle(), stock.getBottle()); }
From source file:net.dv8tion.jda.core.handle.GuildRoleUpdateHandler.java
@Override protected Long handleInternally(JSONObject content) { final long guildId = content.getLong("guild_id"); if (api.getGuildLock().isLocked(guildId)) return guildId; JSONObject rolejson = content.getJSONObject("role"); GuildImpl guild = (GuildImpl) api.getGuildMap().get(guildId); if (guild == null) { api.getEventCache().cache(EventCache.Type.GUILD, guildId, () -> handle(responseNumber, allContent)); EventCache.LOG.debug("Received a Role Update for a Guild that is not yet cached: " + content); return null; }/*ww w.j a va 2 s. co m*/ final long roleId = rolejson.getLong("id"); RoleImpl role = (RoleImpl) guild.getRolesMap().get(roleId); if (role == null) { api.getEventCache().cache(EventCache.Type.ROLE, roleId, () -> handle(responseNumber, allContent)); EventCache.LOG.debug("Received a Role Update for Role that is not yet cached: " + content); return null; } String name = rolejson.getString("name"); Color color = rolejson.getInt("color") != 0 ? new Color(rolejson.getInt("color")) : null; int position = rolejson.getInt("position"); long permissions = rolejson.getLong("permissions"); boolean hoisted = rolejson.getBoolean("hoist"); boolean mentionable = rolejson.getBoolean("mentionable"); if (!Objects.equals(name, role.getName())) { String oldName = role.getName(); role.setName(name); api.getEventManager().handle(new RoleUpdateNameEvent(api, responseNumber, role, oldName)); } if (!Objects.equals(color, role.getColor())) { Color oldColor = role.getColor(); role.setColor(color); api.getEventManager().handle(new RoleUpdateColorEvent(api, responseNumber, role, oldColor)); } if (!Objects.equals(position, role.getPositionRaw())) { int oldPosition = role.getPosition(); int oldPositionRaw = role.getPositionRaw(); role.setRawPosition(position); api.getEventManager() .handle(new RoleUpdatePositionEvent(api, responseNumber, role, oldPosition, oldPositionRaw)); } if (!Objects.equals(permissions, role.getPermissionsRaw())) { long oldPermissionsRaw = role.getPermissionsRaw(); role.setRawPermissions(permissions); api.getEventManager() .handle(new RoleUpdatePermissionsEvent(api, responseNumber, role, oldPermissionsRaw)); } if (hoisted != role.isHoisted()) { boolean wasHoisted = role.isHoisted(); role.setHoisted(hoisted); api.getEventManager().handle(new RoleUpdateHoistedEvent(api, responseNumber, role, wasHoisted)); } if (mentionable != role.isMentionable()) { boolean wasMentionable = role.isMentionable(); role.setMentionable(mentionable); api.getEventManager().handle(new RoleUpdateMentionableEvent(api, responseNumber, role, wasMentionable)); } return null; }
From source file:com.autodesk.client.model.ObjectFullDetailsDeltas.java
@Override public boolean equals(java.lang.Object o) { if (this == o) { return true; }//from ww w .j ava2 s . c om if (o == null || getClass() != o.getClass()) { return false; } ObjectFullDetailsDeltas objectFullDetailsDeltas = (ObjectFullDetailsDeltas) o; return Objects.equals(this.position, objectFullDetailsDeltas.position) && Objects.equals(this.sha1, objectFullDetailsDeltas.sha1); }