Record Class TaxCalculator.TaxResult
java.lang.Object
java.lang.Record
org.episteme.social.economics.TaxCalculator.TaxResult
- Enclosing class:
TaxCalculator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theeffectiveRaterecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegrossIncomerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themarginalRaterecord component.Returns the value of thenetIncomerecord component.Returns the value of thetaxableIncomerecord component.taxOwed()Returns the value of thetaxOwedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TaxResult
public TaxResult(Money grossIncome, Money taxableIncome, Money taxOwed, Real effectiveRate, Real marginalRate, Money netIncome) Creates an instance of aTaxResultrecord class.- Parameters:
grossIncome- the value for thegrossIncomerecord componenttaxableIncome- the value for thetaxableIncomerecord componenttaxOwed- the value for thetaxOwedrecord componenteffectiveRate- the value for theeffectiveRaterecord componentmarginalRate- the value for themarginalRaterecord componentnetIncome- the value for thenetIncomerecord component
-
-
Method Details
-
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). -
grossIncome
Returns the value of thegrossIncomerecord component.- Returns:
- the value of the
grossIncomerecord component
-
taxableIncome
Returns the value of thetaxableIncomerecord component.- Returns:
- the value of the
taxableIncomerecord component
-
taxOwed
Returns the value of thetaxOwedrecord component.- Returns:
- the value of the
taxOwedrecord component
-
effectiveRate
Returns the value of theeffectiveRaterecord component.- Returns:
- the value of the
effectiveRaterecord component
-
marginalRate
Returns the value of themarginalRaterecord component.- Returns:
- the value of the
marginalRaterecord component
-
netIncome
Returns the value of thenetIncomerecord component.- Returns:
- the value of the
netIncomerecord component
-