List of usage examples for java.util Objects equals
public static boolean equals(Object a, Object b)
From source file:com.netflix.imfutility.itunes.locale.LocaleHelper.java
public static boolean equalsByDefaultRegion(String lang0, String lang1) { Locale locale0 = ensureDefaultRegion(lang0); Locale locale1 = ensureDefaultRegion(lang1); return Objects.equals(locale0, locale1); }
From source file:hr.softwarecity.osijek.model.CompositeKey.java
@Override public boolean equals(Object obj) { if (obj == null) { return false; }//from w ww. j a v a 2s. c o m if (getClass() != obj.getClass()) { return false; } final CompositeKey other = (CompositeKey) obj; if (!Objects.equals(this.person, other.person)) { return false; } if (!Objects.equals(this.pollination, other.pollination)) { return false; } return true; }
From source file:it.univaq.disim.mobile.cityshop.business.domain.Negoziante.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }//w w w . j a v a 2s .c o m if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Negoziante other = (Negoziante) obj; if (!Objects.equals(this.negozio, other.negozio)) { return false; } return true; }
From source file:com.haulmont.cuba.web.jmx.JmxConnectionHelper.java
protected static ObjectName getObjectName(final MBeanServerConnection connection, final String remoteContext, final Class objectClass) throws IOException { Set<ObjectName> names = connection.queryNames(null, null); return IterableUtils.find(names, o -> { if (!Objects.equals(remoteContext, o.getDomain())) { return false; }/* ww w. j a v a 2 s . co m*/ MBeanInfo info; try { info = connection.getMBeanInfo(o); } catch (Exception e) { throw new JmxControlException(e); } return Objects.equals(objectClass.getName(), info.getClassName()); }); }
From source file:org.hawkular.client.metrics.model.Counter.java
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Counter gauge = (Counter) o;// w w w . j av a2s .co m return Objects.equals(id, gauge.id) && Objects.equals(data, gauge.data); }
From source file:io.pivotal.strepsirrhini.chaosloris.data.ScheduleDeletedEvent.java
@Override public boolean equals(Object o) { if (this == o) { return true; }//w ww . ja va2 s. co m if (o == null || getClass() != o.getClass()) { return false; } ScheduleDeletedEvent that = (ScheduleDeletedEvent) o; return Objects.equals(this.id, that.id) && Objects.equals(getSource(), that.getSource()); }
From source file:cz.hobrasoft.pdfmu.jackson.SignatureDisplay.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }//from w w w . j a v a 2s .co m if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final SignatureDisplay other = (SignatureDisplay) obj; if (!Objects.equals(this.nRevisions, other.nRevisions)) { return false; } if (!Objects.equals(this.signatures, other.signatures)) { return false; } return true; }
From source file:com.vsct.dt.strowgr.admin.nsq.payload.DeleteRequested.java
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeleteRequested that = (DeleteRequested) o; return Objects.equals(header, that.header); }
From source file:Main.java
/** * Check whether the given Enumeration contains the given element. * @param enumeration the Enumeration to check * @param element the element to look for * @return {@code true} if found, {@code false} else *///from w w w .j a va2s. c om public static boolean contains(Enumeration<?> enumeration, Object element) { if (enumeration != null) { while (enumeration.hasMoreElements()) { Object candidate = enumeration.nextElement(); if (Objects.equals(candidate, element)) return true; } } return false; }
From source file:xyz.cloudbans.entities.events.PlayerBanEvent.java
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof PlayerBanEvent)) return false; PlayerBanEvent that = (PlayerBanEvent) o; return Objects.equals(getBan(), that.getBan()) && getAction() == that.getAction(); }