Record Class CostLine

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.spi.CostLine
Record Components:
label - what is being paid for, for example Fabric connection EVPL_VC 1000 Mbps to AWS
metro - the metro the item belongs to, or null for a portfolio-wide item
monthly - the expected recurring monthly amount
oneTime - the one-time amount (setup, installation); zero when none
currency - ISO 4217 code of every amount on this line
source - where the figure came from (live API, reference table, estimate...)
monthlyLow - the low end of the plausible monthly range; equals monthly for a live price
monthlyHigh - the high end of the plausible monthly range; equals monthly for a live price
note - provenance detail (rate-card note, as-of date, assumption); may be null
conversion - when the item was priced in another currency: the original amounts and currency and the rate used (monthly, oneTime and currency are then the converted figures); null when the item was priced in currency

public record CostLine(String label, MetroId metro, BigDecimal monthly, BigDecimal oneTime, String currency, PriceSource source, BigDecimal monthlyLow, BigDecimal monthlyHigh, String note, CostLine.Conversion conversion) extends Record
One priced item of a portfolio, with where the figure came from and how far it could be off.
  • Constructor Details

  • Method Details

    • converted

      public boolean converted()
      Returns:
      true when the line was converted from another currency
    • exact

      public static CostLine exact(String label, MetroId metro, BigDecimal monthly, BigDecimal oneTime, String currency, PriceSource source, String note)
      A line whose figure is exact (no range), for example a live Equinix price.
      Parameters:
      label - what is being paid for
      metro - the metro, or null
      monthly - the recurring monthly amount
      oneTime - the one-time amount, or null for none
      currency - ISO 4217 code
      source - where the figure came from
      note - provenance detail, or null
      Returns:
      the line
    • 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.
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • metro

      public MetroId metro()
      Returns the value of the metro record component.
      Returns:
      the value of the metro record component
    • monthly

      public BigDecimal monthly()
      Returns the value of the monthly record component.
      Returns:
      the value of the monthly record component
    • oneTime

      public BigDecimal oneTime()
      Returns the value of the oneTime record component.
      Returns:
      the value of the oneTime record component
    • currency

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

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

      public BigDecimal monthlyLow()
      Returns the value of the monthlyLow record component.
      Returns:
      the value of the monthlyLow record component
    • monthlyHigh

      public BigDecimal monthlyHigh()
      Returns the value of the monthlyHigh record component.
      Returns:
      the value of the monthlyHigh record component
    • note

      public String note()
      Returns the value of the note record component.
      Returns:
      the value of the note record component
    • conversion

      public CostLine.Conversion conversion()
      Returns the value of the conversion record component.
      Returns:
      the value of the conversion record component