Record Class CommercialTerms
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.spec.CommercialTerms
- Record Components:
currency- ISO 4217 code budgets are stated in and totals are compared in; may benull(USD)budgetMaxMonthly- most the design may cost per month, incurrency; may benullbudgetMinMonthly- least expected monthly spend, incurrency; may benullterm- commitment term to price at; may benull(let the engine compare terms)annualGrowthRate- expected yearly traffic growth as a fraction (0.25= 25%); may benullhorizonMonths- how far ahead to project cost and capacity; may benull(12)exchangeRates- caller-supplied rates that restate prices in other currencies incurrency; may benull(nothing is converted). The SDK never fetches or invents a rate.
public record CommercialTerms(String currency, BigDecimal budgetMaxMonthly, BigDecimal budgetMinMonthly, Term term, Double annualGrowthRate, Integer horizonMonths, CommercialTerms.ExchangeRates exchangeRates)
extends Record
The commercial frame the design is priced and judged in.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordExchange rates pinned in the spec: they take precedence over every other rate source (a caller's converter, the live ECB rates, the bundled table) and are part of the spec's fingerprint, so a run can be reproduced exactly. -
Constructor Summary
ConstructorsConstructorDescriptionCommercialTerms(String currency, BigDecimal budgetMaxMonthly, BigDecimal budgetMinMonthly, Term term, Double annualGrowthRate, Integer horizonMonths) The terms without exchange rates.CommercialTerms(String currency, BigDecimal budgetMaxMonthly, BigDecimal budgetMinMonthly, Term term, Double annualGrowthRate, Integer horizonMonths, CommercialTerms.ExchangeRates exchangeRates) Creates an instance of aCommercialTermsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannualGrowthRaterecord component.Returns the value of thebudgetMaxMonthlyrecord component.Returns the value of thebudgetMinMonthlyrecord component.currency()Returns the value of thecurrencyrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexchangeRatesrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehorizonMonthsrecord component.intterm()Returns the value of thetermrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CommercialTerms
public CommercialTerms(String currency, BigDecimal budgetMaxMonthly, BigDecimal budgetMinMonthly, Term term, Double annualGrowthRate, Integer horizonMonths) The terms without exchange rates.- Parameters:
currency- see the recordbudgetMaxMonthly- see the recordbudgetMinMonthly- see the recordterm- see the recordannualGrowthRate- see the recordhorizonMonths- see the record
-
CommercialTerms
public CommercialTerms(String currency, BigDecimal budgetMaxMonthly, BigDecimal budgetMinMonthly, Term term, Double annualGrowthRate, Integer horizonMonths, CommercialTerms.ExchangeRates exchangeRates) Creates an instance of aCommercialTermsrecord class.- Parameters:
currency- the value for thecurrencyrecord componentbudgetMaxMonthly- the value for thebudgetMaxMonthlyrecord componentbudgetMinMonthly- the value for thebudgetMinMonthlyrecord componentterm- the value for thetermrecord componentannualGrowthRate- the value for theannualGrowthRaterecord componenthorizonMonths- the value for thehorizonMonthsrecord componentexchangeRates- the value for theexchangeRatesrecord component
-
-
Method Details
-
currencyOrDefault
- Returns:
- the currency to use,
USDwhen unset
-
horizonMonthsOrDefault
public int horizonMonthsOrDefault()- Returns:
- the projection horizon in months, 12 when unset
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
currency
-
budgetMaxMonthly
Returns the value of thebudgetMaxMonthlyrecord component.- Returns:
- the value of the
budgetMaxMonthlyrecord component
-
budgetMinMonthly
Returns the value of thebudgetMinMonthlyrecord component.- Returns:
- the value of the
budgetMinMonthlyrecord component
-
term
-
annualGrowthRate
Returns the value of theannualGrowthRaterecord component.- Returns:
- the value of the
annualGrowthRaterecord component
-
horizonMonths
Returns the value of thehorizonMonthsrecord component.- Returns:
- the value of the
horizonMonthsrecord component
-
exchangeRates
Returns the value of theexchangeRatesrecord component.- Returns:
- the value of the
exchangeRatesrecord component
-