Record Class FinancialImpact
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.estate.FinancialImpact
- Record Components:
kind- priced, unpriced, or no direct financial effectcurrency- ISO 4217 code of every amount;nullunless pricedmonthlySaving- the expected monthly saving (negative for an added cost);nullunless pricedmonthlySavingLow- the low end of the monthly saving range;nullunless pricedmonthlySavingHigh- the high end of the monthly saving range;nullunless pricedoneTimeCost- a one-time cost of the action (zero when none);nullunless pricedsource- the provenance of the figures;nullunless pricedbasis- the cost lines the saving was derived from (current first, then proposed)reason- why it is unpriced or has no effect, or a provenance note when priced
public record FinancialImpact(FinancialImpact.Kind kind, String currency, BigDecimal monthlySaving, BigDecimal monthlySavingLow, BigDecimal monthlySavingHigh, BigDecimal oneTimeCost, PriceSource source, List<CostLine> basis, String reason)
extends Record
The money a finding's recommended action would save (positive) or cost (negative), with where the
figures came from and how far they could be off.
Three kinds: FinancialImpact.Kind.PRICED carries a currency, an expected monthly saving with a
low/high range, any one-time cost, and the CostLines it was derived from (the current and
the proposed state); FinancialImpact.Kind.UNPRICED means the action has a financial effect that could not
be priced, and reason() says why; FinancialImpact.Kind.NONE means the action has no direct
financial effect (for example fixing a missing notification). An unpriced saving is never
presented as zero.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionFinancialImpact(FinancialImpact.Kind kind, String currency, BigDecimal monthlySaving, BigDecimal monthlySavingLow, BigDecimal monthlySavingHigh, BigDecimal oneTimeCost, PriceSource source, List<CostLine> basis, String reason) Validates that a priced impact carries its figures and a range that contains the expectation. -
Method Summary
Modifier and TypeMethodDescriptionstatic FinancialImpactAn added cost (a negative saving), for example adding a missing secondary connection.basis()Returns the value of thebasisrecord component.static FinancialImpactThe saving of moving fromcurrenttoproposed.currency()Returns the value of thecurrencyrecord component.describe()A short human-readable rendering, for exampleUSD 300.00/month (240.00..360.00, REFERENCE).final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisPriced()Whether the figures are priced.booleanisSaving()Whether the action saves money (priced and the expected saving is positive).kind()Returns the value of thekindrecord component.Returns the value of themonthlySavingrecord component.Returns the value of themonthlySavingHighrecord component.Returns the value of themonthlySavingLowrecord component.static FinancialImpactAn action with no direct financial effect.Returns the value of theoneTimeCostrecord component.reason()Returns the value of thereasonrecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.static FinancialImpactAn action whose financial effect could not be priced.
-
Constructor Details
-
FinancialImpact
public FinancialImpact(FinancialImpact.Kind kind, String currency, BigDecimal monthlySaving, BigDecimal monthlySavingLow, BigDecimal monthlySavingHigh, BigDecimal oneTimeCost, PriceSource source, List<CostLine> basis, String reason) Validates that a priced impact carries its figures and a range that contains the expectation.
-
-
Method Details
-
unpriced
An action whose financial effect could not be priced.- Parameters:
reason- why- Returns:
- the impact
-
none
An action with no direct financial effect.- Parameters:
reason- a short explanation- Returns:
- the impact
-
between
The saving of moving fromcurrenttoproposed. Lines in different currencies are never combined: the result is then unpriced.- Parameters:
current- what the resource costs todayproposed- what it would cost after the action (nullwhen the action removes it)note- a provenance note, ornull- Returns:
- the impact
-
addedCost
An added cost (a negative saving), for example adding a missing secondary connection.- Parameters:
added- the cost line of what would be addednote- a provenance note, ornull- Returns:
- the impact
-
isPriced
public boolean isPriced()Whether the figures are priced.- Returns:
trueforFinancialImpact.Kind.PRICED
-
isSaving
public boolean isSaving()Whether the action saves money (priced and the expected saving is positive).- Returns:
truefor a priced positive saving
-
describe
A short human-readable rendering, for exampleUSD 300.00/month (240.00..360.00, REFERENCE).- Returns:
- the text
-
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). -
kind
-
currency
-
monthlySaving
Returns the value of themonthlySavingrecord component.- Returns:
- the value of the
monthlySavingrecord component
-
monthlySavingLow
Returns the value of themonthlySavingLowrecord component.- Returns:
- the value of the
monthlySavingLowrecord component
-
monthlySavingHigh
Returns the value of themonthlySavingHighrecord component.- Returns:
- the value of the
monthlySavingHighrecord component
-
oneTimeCost
Returns the value of theoneTimeCostrecord component.- Returns:
- the value of the
oneTimeCostrecord component
-
source
-
basis
-
reason
-