Record Class CostLine
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.spi.CostLine
- Record Components:
label- what is being paid for, for exampleFabric connection EVPL_VC 1000 Mbps to AWSmetro- the metro the item belongs to, ornullfor a portfolio-wide itemmonthly- the expected recurring monthly amountoneTime- the one-time amount (setup, installation); zero when nonecurrency- ISO 4217 code of every amount on this linesource- where the figure came from (live API, reference table, estimate...)monthlyLow- the low end of the plausible monthly range; equalsmonthlyfor a live pricemonthlyHigh- the high end of the plausible monthly range; equalsmonthlyfor a live pricenote- provenance detail (rate-card note, as-of date, assumption); may benullconversion- when the item was priced in another currency: the original amounts and currency and the rate used (monthly,oneTimeandcurrencyare then the converted figures);nullwhen the item was priced incurrency
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordHow a line was restated in the comparison currency. -
Constructor Summary
ConstructorsConstructorDescriptionCostLine(String label, MetroId metro, BigDecimal monthly, BigDecimal oneTime, String currency, PriceSource source, BigDecimal monthlyLow, BigDecimal monthlyHigh, String note) A line priced in its own currency (no conversion).CostLine(String label, MetroId metro, BigDecimal monthly, BigDecimal oneTime, String currency, PriceSource source, BigDecimal monthlyLow, BigDecimal monthlyHigh, String note, CostLine.Conversion conversion) Fills defaults and rejects a range that does not contain the expected amount. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconversionrecord component.booleancurrency()Returns the value of thecurrencyrecord component.final booleanIndicates whether some other object is "equal to" this one.static CostLineexact(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.final inthashCode()Returns a hash code value for this object.label()Returns the value of thelabelrecord component.metro()Returns the value of themetrorecord component.monthly()Returns the value of themonthlyrecord component.Returns the value of themonthlyHighrecord component.Returns the value of themonthlyLowrecord component.note()Returns the value of thenoterecord component.oneTime()Returns the value of theoneTimerecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CostLine
public CostLine(String label, MetroId metro, BigDecimal monthly, BigDecimal oneTime, String currency, PriceSource source, BigDecimal monthlyLow, BigDecimal monthlyHigh, String note) A line priced in its own currency (no conversion).- Parameters:
label- see the recordmetro- see the recordmonthly- see the recordoneTime- see the recordcurrency- see the recordsource- see the recordmonthlyLow- see the recordmonthlyHigh- see the recordnote- see the record
-
CostLine
public CostLine(String label, MetroId metro, BigDecimal monthly, BigDecimal oneTime, String currency, PriceSource source, BigDecimal monthlyLow, BigDecimal monthlyHigh, String note, CostLine.Conversion conversion) Fills defaults and rejects a range that does not contain the expected amount.
-
-
Method Details
-
converted
public boolean converted()- Returns:
truewhen 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 formetro- the metro, ornullmonthly- the recurring monthly amountoneTime- the one-time amount, ornullfor nonecurrency- ISO 4217 codesource- where the figure came fromnote- provenance detail, ornull- Returns:
- the line
-
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). -
label
-
metro
-
monthly
-
oneTime
-
currency
-
source
-
monthlyLow
Returns the value of themonthlyLowrecord component.- Returns:
- the value of the
monthlyLowrecord component
-
monthlyHigh
Returns the value of themonthlyHighrecord component.- Returns:
- the value of the
monthlyHighrecord component
-
note
-
conversion
Returns the value of theconversionrecord component.- Returns:
- the value of the
conversionrecord component
-