@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } UnsignedIntegerEffectiveImplBase other = (UnsignedIntegerEffectiveImplBase) obj; if (!Objects.equals(description, other.description)) { return false; } if (!Objects.equals(qName, other.qName)) { return false; } if (!Objects.equals(path, other.path)) { return false; } if (!Objects.equals(rangeStatements, other.rangeStatements)) { return false; } if (!Objects.equals(units, other.units)) { return false; } return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Student student = (Student) o; return Objects.equals(name, student.name) && Objects.equals(surname, student.surname); }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Barrel other = (Barrel) obj; if (this.id != other.id) { return false; } if (!Objects.equals(this.bought, other.bought)) { return false; } if (!Objects.equals(this.taped, other.taped)) { return false; } if (Double.doubleToLongBits(this.price) != Double.doubleToLongBits(other.price)) { return false; } if (!Objects.equals(this.kind, other.kind)) { return false; } return true; }
private void checkConstraints(DiscapacidadDetalle toAdd) throws MessageException { if (toAdd.getPeriodoYear() == null) { throw new MessageException("Número de carpeta no válida"); } DefaultTableModel dtm = (DefaultTableModel) abmPanel.getjTable1().getModel(); for (int row = 0; row < dtm.getRowCount(); row++) { DiscapacidadDetalle oldDiscapacidadDetalle = (DiscapacidadDetalle) dtm.getValueAt(row, 0); if (oldDiscapacidadDetalle.getTipoDocumento().equals(toAdd.getTipoDocumento()) && Objects.equals( oldDiscapacidadDetalle.getSubTipoDocumento(), toAdd.getSubTipoDocumento()) && Objects.equals(oldDiscapacidadDetalle.getDocumentoNumero(), toAdd.getDocumentoNumero()) && Objects.equals(oldDiscapacidadDetalle.getPeriodoYear(), toAdd.getPeriodoYear()) && Objects.equals(oldDiscapacidadDetalle.getNombre(), toAdd.getNombre()) && Objects.equals(oldDiscapacidadDetalle.getApellido(), toAdd.getApellido())) { throw new MessageException( "Ya existe un detalle con los mismos datos:" + "\nTipo de Documento: " + toAdd.getTipoDocumento().getNombre() + "\nSub-Tipo de Documento: " + (toAdd.getSubTipoDocumento() == null ? "<Sin Sub-Tipo>" : toAdd.getSubTipoDocumento().getNombre()) + "\nN° Documento: " + Objects.toString(toAdd.getDocumentoNumero(), "") + "\nPeriodo: " + Objects.toString(toAdd.getPeriodoYear(), "") + "\nNombre: " + (toAdd.getApellido() == null ? "" : toAdd.getApellido() + ", ") + (Objects.toString(toAdd.getNombre(), ""))); } } }
/** Vérifie si cette entré est identique à l'objet spécifié. */ @Override public boolean equals(final Object object) { if (object == this) { return true; } final DataBlockDefinitionType that = (DataBlockDefinitionType) object; if (this.components != null && that.components != null) { if (this.components.size() != that.components.size()) { return false; } final Iterator<? extends JAXBElement<? extends AbstractDataComponentType>> i = this.components.iterator(); final Iterator<? extends JAXBElement<? extends AbstractDataComponentType>> i2 = that.components.iterator(); while (i.hasNext() && i2.hasNext()) { if (!Objects.equals(i.next().getValue(), i2.next().getValue())) return false; } } else { if (this.components != null || that.components != null) { return false; } } return Objects.equals(this.id, that.id) && Objects.equals(this.encoding, that.encoding); }
@Override public Integer evaluate(IDictionary<String, Integer> symbolTable, IHeap<Integer> heap) throws DomainException { Integer value = 0; Integer l = leftExpression.evaluate(symbolTable, heap); Integer r = rightExpression.evaluate(symbolTable, heap); switch (operator) { case LESS: value = (l < r) ? 1 : 0; break; case LESS_OR_EQUAL: value = (l <= r) ? 1 : 0; break; case EQUAL: value = (Objects.equals(l, r)) ? 1 : 0; break; case NOT_EQUAL: value = (!Objects.equals(l, r)) ? 1 : 0; break; case GREATER: value = (l > r) ? 1 : 0; break; case GREATER_OR_EQUAL: value = (l >= r) ? 1 : 0; break; case AND: value = (l != 0 && r != 0) ? 1 : 0; break; case OR: value = (l != 0 || r != 0) ? 1 : 0; break; } return value; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final CuentaPK other = (CuentaPK) obj; if (!Objects.equals(this.ejercicio, other.ejercicio)) { return false; } if (!Objects.equals(this.idCtaMayor, other.idCtaMayor)) { return false; } if (!Objects.equals(this.tipoCuenta, other.tipoCuenta)) { return false; } if (!Objects.equals(this.idCosto, other.idCosto)) { return false; } if (!Objects.equals(this.idAuxiliar, other.idAuxiliar)) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Guidebook other = (Guidebook) obj; if (Double.doubleToLongBits(this.challengesCompleted) != Double.doubleToLongBits(other.challengesCompleted)) { return false; } if (!Objects.equals(this.fairytaleTitle, other.fairytaleTitle)) { return false; } if (!Objects.equals(this.fairytaleDescription, other.fairytaleDescription)) { return false; } if (!Objects.equals(this.challengesAvailable, other.challengesAvailable)) { return false; } if (!Objects.equals(this.map, other.map)) { return false; } if (!Objects.equals(this.game, other.game)) { return false; } return true; }
// Since the app uses different Locales, I need to build up my string in this activity to get // access to string resources // Might look dirty but works nicely @TargetApi(Build.VERSION_CODES.KITKAT) private String convertMessage() { String messageString = ""; if (game.message != null && !Objects.equals(game.message, "")) { String[] splittedMessage = game.message.split(Pattern.quote("||")); if (Objects.equals(splittedMessage[0], "is_a_word")) { messageString = splittedMessage[1] + getString(R.string.is_a_word) + "\r\n" + splittedMessage[2] + getString(R.string.wins_this_time); } else if (Objects.equals(splittedMessage[0], "is_no_word")) { messageString = splittedMessage[1] + getString(R.string.is_no_word) + "\r\n" + splittedMessage[2] + getString(R.string.wins_this_time); if (splittedMessage.length == 4) { messageString += "\r\n" + getString(R.string.last_word) + "'" + splittedMessage[3] + "'"; } } } return messageString; }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof ProjectFilesystem)) { return false; } ProjectFilesystem that = (ProjectFilesystem) other; if (!Objects.equals(projectRoot, that.projectRoot)) { return false; } if (!Objects.equals(whiteListedPaths, that.whiteListedPaths)) { return false; } if (!Objects.equals(blackListedPaths, that.blackListedPaths)) { return false; } return true; }
@Override protected boolean doEquals(Builder other) { return Objects.equals(fieldName, other.fieldName) && Objects.equals(geohash, other.geohash) && Objects.equals(levels, other.levels) && Objects.equals(neighbors, other.neighbors); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Greeting greeting = (Greeting) o; return Objects.equals(what, greeting.what) && Objects.equals(to, greeting.to); }
public String getBaseType() { Class<?> model = getModel(); String type = getType(); String baseType = null; if ((model != null) && Validator.isNull(type)) { baseType = ModelHintsUtil.getType(model.getName(), getField()); } else if (Validator.isNotNull(type)) { if (Objects.equals(type, "checkbox") || Objects.equals(type, "radio") || Objects.equals(type, "resource")) { baseType = type; } else if (Objects.equals(type, "toggle-card") || Objects.equals(type, "toggle-switch")) { baseType = "checkbox"; } } if (Validator.isNull(baseType)) { baseType = "text"; } return baseType; }
@Override default boolean startsWith(Iterable<? extends T> that, int offset) { Objects.requireNonNull(that, "that is null"); if (offset < 0) return false; if (that instanceof IndexedSeq) { IndexedSeq<? extends T> dhat = (IndexedSeq<? extends T>) that; int i = offset; int j = 0; int thisLen = length(); int thatLen = dhat.length(); while (i < thisLen && j < thatLen && Objects.equals(this.get(i), dhat.get(j))) { i++; j++; } return j == thatLen; } else { int i = offset; int thisLen = length(); java.util.Iterator<? extends T> thatElems = that.iterator(); while (i < thisLen && thatElems.hasNext()) { if (!Objects.equals(this.get(i), thatElems.next())) { return false; } i++; } return !thatElems.hasNext(); } }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SearchResultEntity that = (SearchResultEntity) o; return Objects.equals(name, that.name) && Objects.equals(entityGroup, that.entityGroup); }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof EquityTotalReturnSwap)) { return false; } final EquityTotalReturnSwap other = (EquityTotalReturnSwap) obj; if (!Objects.equals(_equity, other._equity)) { return false; } if (Double.compare(_notionalAmount, other._notionalAmount) != 0) { return false; } if (!Objects.equals(_notionalCurrency, other._notionalCurrency)) { return false; } if (Double.compare(_dividendRatio, other._dividendRatio) != 0) { return false; } return true; }
/** * Tests this resolved module for equality with the given object. * * <p>If the given object is not a {@code ResolvedModule} then this method returns {@code false}. * Two {@code ResolvedModule} objects are equal if they are in the same configuration and have * equal references to the module content. * * <p>This method satisfies the general contract of the {@link java.lang.Object#equals(Object) * Object.equals} method. * * @param ob the object to which this object is to be compared * @return {@code true} if, and only if, the given object is a module reference that is equal to * this module reference */ @Override public boolean equals(Object ob) { if (!(ob instanceof ResolvedModule)) return false; ResolvedModule that = (ResolvedModule) ob; return Objects.equals(this.cf, that.cf) && Objects.equals(this.mref, that.mref); }
/** * Returns the best name to identify {@code className} with in the current context. This uses the * available imports and the current scope to find the shortest name available. It does not honor * names visible due to inheritance. */ String lookupName(ClassName className) { // Find the shortest suffix of className that resolves to className. This uses both local type // names (so `Entry` in `Map` refers to `Map.Entry`). Also uses imports. boolean nameResolved = false; for (ClassName c = className; c != null; c = c.enclosingClassName()) { ClassName resolved = resolve(c.simpleName()); nameResolved = resolved != null; if (Objects.equals(resolved, c)) { int suffixOffset = c.simpleNames().size() - 1; return join( ".", className.simpleNames().subList(suffixOffset, className.simpleNames().size())); } } // If the name resolved but wasn't a match, we're stuck with the fully qualified name. if (nameResolved) { return className.canonicalName; } // If the class is in the same package, we're done. if (Objects.equals(packageName, className.packageName())) { referencedNames.add(className.topLevelClassName().simpleName()); return join(".", className.simpleNames()); } // We'll have to use the fully-qualified name. Mark the type as importable for a future pass. if (!javadoc) { importableType(className); } return className.canonicalName; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Player other = (Player) obj; if (this.rank != other.rank) { return false; } if (!Objects.equals(this.name, other.name)) { return false; } if (!Objects.equals(this.country, other.country)) { return false; } if (!Objects.equals(this.dateOfBirth, other.dateOfBirth)) { return false; } if (this.points != other.points) { return false; } return this.tournaments == other.tournaments; }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } final CouponFixed other = (CouponFixed) obj; if (Double.doubleToLongBits(_amount) != Double.doubleToLongBits(other._amount)) { return false; } if (Double.doubleToLongBits(_fixedRate) != Double.doubleToLongBits(other._fixedRate)) { return false; } if (!Objects.equals(_accrualEndDate, other._accrualEndDate)) { return false; } if (!Objects.equals(_accrualStartDate, other._accrualStartDate)) { return false; } return true; }
/** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } AccessControlGroup other = (AccessControlGroup) obj; // prevent infinity loops or other sick effects... // if (!Objects.equal(this.inherits, other.inherits)) { // return false; // } if (!Objects.equals(this.permissions, other.permissions)) { return false; } if (!Objects.equals(this.type, other.type)) { return false; } return true; }
private ErrorObject validateIdTokenClaims( ReadOnlyJWTClaimsSet claimsSet, SessionManager.Entry entry) { ErrorObject error = CommonValidator.validateBaseJwtClaims(claimsSet, TokenClass.ID_TOKEN); if (error == null && !Objects.equals(this.tenantInfo.getIssuer().getValue(), claimsSet.getIssuer())) { error = OAuth2Error.INVALID_REQUEST.setDescription("id_token has incorrect issuer"); } if (error == null && entry != null && !Objects.equals(entry.getPersonUser().getSubject().getValue(), claimsSet.getSubject())) { error = OAuth2Error.INVALID_REQUEST.setDescription( "id_token subject does not match the session user"); } if (error == null && claimsSet.getAudience().size() != 1) { error = OAuth2Error.INVALID_REQUEST.setDescription( "id_token must have a single audience value containing the client_id"); } return error; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final TransaksiPenjualan other = (TransaksiPenjualan) obj; if (this.idTransaksi != other.idTransaksi) { return false; } if (!Objects.equals(this.user, other.user)) { return false; } if (!Objects.equals(this.tanggal, other.tanggal)) { return false; } if (!Objects.equals(this.jam, other.jam)) { return false; } if (this.total != other.total) { return false; } if (this.pembayaran != other.pembayaran) { return false; } if (this.sisa != other.sisa) { return false; } if (this.profit != other.profit) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final PlayerCharacter other = (PlayerCharacter) obj; if (Double.doubleToLongBits(this.coordinates) != Double.doubleToLongBits(other.coordinates)) { return false; } if (Double.doubleToLongBits(this.statistics) != Double.doubleToLongBits(other.statistics)) { return false; } if (!Objects.equals(this.name, other.name)) { return false; } if (!Objects.equals(this.description, other.description)) { return false; } return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TestApplicationConfiguration that = (TestApplicationConfiguration) o; return Objects.equals(foo, that.foo) && Objects.equals(bar, that.bar); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TestNamedWriteable that = (TestNamedWriteable) o; return Objects.equals(field1, that.field1) && Objects.equals(field2, that.field2); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof TermQuery)) return false; TermQuery that = (TermQuery) o; return Objects.equals(term, that.term) && Objects.equals(queryOperator, that.queryOperator); }
private static boolean matchNode(final ValueNode origin, final ValueNode candidate) { if (Objects.equals(origin.type, candidate.type)) { if (origin.render != null && origin.render.contains("readonly") && !Objects.equals(origin.defaultValue, candidate.value)) { return false; } else if (!origin.getPredefinedValues().isEmpty() && !origin.getPredefinedValues().contains(candidate.value)) { return false; } for (ValueNode originChild : origin.children) { final List<ValueNode> candidateChildren = candidate.getChildrenByName(originChild.name); if (!originChild.multiple && candidateChildren.size() > 1) { return false; } for (ValueNode candidateChild : candidateChildren) { if (!matchNode(originChild, candidateChild)) { return false; } } } return true; } return false; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Person other = (Person) obj; if (this.height != other.height) { return false; } if (Double.doubleToLongBits(this.weight) != Double.doubleToLongBits(other.weight)) { return false; } if (!Objects.equals(this.name, other.name)) { return false; } if (!Objects.equals(this.dateOfBirth, other.dateOfBirth)) { return false; } if (this.gender != other.gender) { return false; } if (!Objects.equals(this.address, other.address)) { return false; } return true; }
@Override protected boolean doEquals(Object obj) { BucketSelectorPipelineAggregationBuilder other = (BucketSelectorPipelineAggregationBuilder) obj; return Objects.equals(bucketsPathsMap, other.bucketsPathsMap) && Objects.equals(script, other.script) && Objects.equals(gapPolicy, other.gapPolicy); }