/** * <pre> * The 3-letter currency code defined in ISO 4217. * </pre> * * <code>string currency_code = 1;</code> */ public Builder clearCurrencyCode() { currencyCode_ = getDefaultInstance().getCurrencyCode(); onChanged(); return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.type.Money)) { return super.equals(obj); } com.google.type.Money other = (com.google.type.Money) obj; boolean result = true; result = result && getCurrencyCode() .equals(other.getCurrencyCode()); result = result && (getUnits() == other.getUnits()); result = result && (getNanos() == other.getNanos()); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CURRENCY_CODE_FIELD_NUMBER; hash = (53 * hash) + getCurrencyCode().hashCode(); hash = (37 * hash) + UNITS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getUnits()); hash = (37 * hash) + NANOS_FIELD_NUMBER; hash = (53 * hash) + getNanos(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.type.Money other) { if (other == com.google.type.Money.getDefaultInstance()) return this; if (!other.getCurrencyCode().isEmpty()) { currencyCode_ = other.currencyCode_; onChanged(); } if (other.getUnits() != 0L) { setUnits(other.getUnits()); } if (other.getNanos() != 0) { setNanos(other.getNanos()); } onChanged(); return this; }