return false; } else { if (!amount.equals(other.amount)) return false;
if (funding.getAmount() != null && StringUtils.isNotBlank(funding.getAmount().getContent())) { String amount = funding.getAmount().getContent(); Locale locale = localeManager.getLocale(); ParsePosition parsePosition = new ParsePosition(0); "The amount: " + amount + " doesn'n have the right format, it should use the format: " + numberFormatExample.format(example)); funding.getAmount().setContent(formattedAmount);
Amount orcidAmount = new Amount(); orcidAmount.setContent(stringAmount); orcidAmount.setCurrencyCode(profileFundingEntity.getCurrencyCode() != null ? profileFundingEntity.getCurrencyCode() : null); funding.setAmount(orcidAmount);
String amount = StringUtils.isNotBlank(funding.getAmount().getContent()) ? funding.getAmount().getContent() : null; String currencyCode = funding.getAmount().getCurrencyCode() != null ? funding.getAmount().getCurrencyCode() : null; if (StringUtils.isNotBlank(amount)) { try {
/** * * Note that put-code is not part of hashCode or equals! This is to allow * better de-duplication. * */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((title == null) ? 0 : title.hashCode()); result = prime * result + ((description == null) ? 0 : description.hashCode()); result = prime * result + ((type == null) ? 0 : type.hashCode()); result = prime * result + ((organizationDefinedFundingType == null) ? 0 : organizationDefinedFundingType.hashCode()); result = prime * result + ((amount == null) ? 0 : amount.hashCode()); result = prime * result + ((url == null) ? 0 : url.hashCode()); result = prime * result + ((organization == null) ? 0 : organization.hashCode()); result = prime * result + ((visibility == null) ? 0 : visibility.hashCode()); result = prime * result + ((source == null) ? 0 : source.hashCode()); result = prime * result + ((fundingExternalIdentifiers == null) ? 0 : fundingExternalIdentifiers.hashCode()); result = prime * result + ((fundingContributors == null) ? 0 : fundingContributors.hashCode()); result = prime * result + ((startDate == null) ? 0 : startDate.hashCode()); result = prime * result + ((endDate == null) ? 0 : endDate.hashCode()); return result; }
return false; } else { if (!amount.equals(other.amount)) return false;