java.lang.Object
io.github.tonywasher.joceanus.moneywise.tax.uk.MoneyWiseUKIncomeScheme
All Implemented Interfaces:
MetisDataItem.MetisDataObjectFormat, MetisFieldItem
Direct Known Subclasses:
MoneyWiseUKCapitalScheme, MoneyWiseUKChargeableGainsScheme, MoneyWiseUKDividendScheme, MoneyWiseUKInterestScheme, MoneyWiseUKRoomRentalScheme

public class MoneyWiseUKIncomeScheme extends Object implements MetisFieldItem
Income Tax Scheme.
  • Constructor Details

    • MoneyWiseUKIncomeScheme

      protected MoneyWiseUKIncomeScheme()
      Constructor.
    • MoneyWiseUKIncomeScheme

      protected MoneyWiseUKIncomeScheme(Boolean pReliefAvailable)
      Constructor.
      Parameters:
      pReliefAvailable - Is tax relief available?
  • Method Details

    • taxReliefAvailable

      public Boolean taxReliefAvailable()
      Is tax relief available?
      Returns:
      true/false
    • allocateToTaxBands

      protected io.github.tonywasher.joceanus.moneywise.tax.MoneyWiseTaxBandSet allocateToTaxBands(MoneyWiseUKTaxConfig pConfig, io.github.tonywasher.joceanus.moneywise.data.statics.MoneyWiseTaxClass pBasis, OceanusMoney pAmount)
      Allocate the amount to the appropriate tax bands.
      Parameters:
      pConfig - the taxConfig
      pBasis - the taxBasis
      pAmount - the amount to be allocated
      Returns:
      the tax bands
    • taxBandIterator

      protected Iterator<io.github.tonywasher.joceanus.moneywise.tax.MoneyWiseTaxBandSet.MoneyWiseTaxBand> taxBandIterator(MoneyWiseUKTaxConfig pConfig, io.github.tonywasher.joceanus.moneywise.data.statics.MoneyWiseTaxClass pBasis)
      Obtain the taxBand iterator.
      Parameters:
      pConfig - the taxConfig
      pBasis - the taxBasis
      Returns:
      the iterator
    • getAmountInAllowance

      protected OceanusMoney getAmountInAllowance(MoneyWiseUKTaxConfig pConfig, OceanusMoney pAmount)
      Obtain the taxFree amount.
      Parameters:
      pConfig - the taxConfig
      pAmount - the amount that is to be adjusted
      Returns:
      the amount remaining
    • adjustAllowances

      protected OceanusMoney adjustAllowances(MoneyWiseUKTaxConfig pConfig, OceanusMoney pAmount)
      Adjust Allowances.
      Parameters:
      pConfig - the taxConfig
      pAmount - the amount that is to be adjusted
      Returns:
      the amount remaining
    • adjustTaxBands

      protected void adjustTaxBands(MoneyWiseUKTaxConfig pConfig, OceanusMoney pAmount)
      Adjust TaxBands.
      Parameters:
      pConfig - the taxConfig
      pAmount - the amount that is to be adjusted
    • adjustForAllowance

      protected OceanusMoney adjustForAllowance(OceanusMoney pAllowance, OceanusMoney pAmount)
      Adjust For an allowance/band.
      Parameters:
      pAllowance - the allowance
      pAmount - the amount that is to be adjusted
      Returns:
      the amount remaining
    • getAmountInBand

      protected static OceanusMoney getAmountInBand(OceanusMoney pBand, OceanusMoney pAmount)
      Obtain the amount of income that falls in a band.
      Parameters:
      pBand - the band
      pAmount - the amount available
      Returns:
      the amount within the band
    • getDataFieldSet

      public MetisFieldSet<? extends MoneyWiseUKIncomeScheme> getDataFieldSet()
      Description copied from interface: MetisFieldItem
      Obtain the fieldSet.
      Specified by:
      getDataFieldSet in interface MetisFieldItem
      Returns:
      the fieldSet
    • formatObject

      public String formatObject(OceanusDataFormatter pFormatter)
      Description copied from interface: MetisDataItem.MetisDataObjectFormat
      Obtain Object summary.
      Specified by:
      formatObject in interface MetisDataItem.MetisDataObjectFormat
      Parameters:
      pFormatter - the data formatter
      Returns:
      the display summary of the object