Record Class FinancialImpact

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.estate.FinancialImpact
Record Components:
kind - priced, unpriced, or no direct financial effect
currency - ISO 4217 code of every amount; null unless priced
monthlySaving - the expected monthly saving (negative for an added cost); null unless priced
monthlySavingLow - the low end of the monthly saving range; null unless priced
monthlySavingHigh - the high end of the monthly saving range; null unless priced
oneTimeCost - a one-time cost of the action (zero when none); null unless priced
source - the provenance of the figures; null unless priced
basis - 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.

  • Constructor Details

  • Method Details

    • unpriced

      public static FinancialImpact unpriced(String reason)
      An action whose financial effect could not be priced.
      Parameters:
      reason - why
      Returns:
      the impact
    • none

      public static FinancialImpact none(String reason)
      An action with no direct financial effect.
      Parameters:
      reason - a short explanation
      Returns:
      the impact
    • between

      public static FinancialImpact between(CostLine current, CostLine proposed, String note)
      The saving of moving from current to proposed. Lines in different currencies are never combined: the result is then unpriced.
      Parameters:
      current - what the resource costs today
      proposed - what it would cost after the action (null when the action removes it)
      note - a provenance note, or null
      Returns:
      the impact
    • addedCost

      public static FinancialImpact addedCost(CostLine added, String note)
      An added cost (a negative saving), for example adding a missing secondary connection.
      Parameters:
      added - the cost line of what would be added
      note - a provenance note, or null
      Returns:
      the impact
    • isPriced

      public boolean isPriced()
      Whether the figures are priced.
      Returns:
      true for FinancialImpact.Kind.PRICED
    • isSaving

      public boolean isSaving()
      Whether the action saves money (priced and the expected saving is positive).
      Returns:
      true for a priced positive saving
    • describe

      public String describe()
      A short human-readable rendering, for example USD 300.00/month (240.00..360.00, REFERENCE).
      Returns:
      the text
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • kind

      public FinancialImpact.Kind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • currency

      public String currency()
      Returns the value of the currency record component.
      Returns:
      the value of the currency record component
    • monthlySaving

      public BigDecimal monthlySaving()
      Returns the value of the monthlySaving record component.
      Returns:
      the value of the monthlySaving record component
    • monthlySavingLow

      public BigDecimal monthlySavingLow()
      Returns the value of the monthlySavingLow record component.
      Returns:
      the value of the monthlySavingLow record component
    • monthlySavingHigh

      public BigDecimal monthlySavingHigh()
      Returns the value of the monthlySavingHigh record component.
      Returns:
      the value of the monthlySavingHigh record component
    • oneTimeCost

      public BigDecimal oneTimeCost()
      Returns the value of the oneTimeCost record component.
      Returns:
      the value of the oneTimeCost record component
    • source

      public PriceSource source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • basis

      public List<CostLine> basis()
      Returns the value of the basis record component.
      Returns:
      the value of the basis record component
    • reason

      public String reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component