Bands

world.money.Bands
See theBands companion object
final case class Bands

A graduated scale of marginal percentage rates over a monetary base - a PAYE table, a tiered lending rate. The table is the application's configuration; world supplies the arithmetic: the marginal charge per band, and the exact inverse that net-pay contracting works backwards through. That inverse is total because assembly bounds every rate below one hundred percent.

For a scale over a quantity see Blocks; for flat charges by bracket see Charges. Instances via Bands.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def banded[C <: Currency & Singleton](amount: Money[C], mode: Rounding)(using ValueOf[C]): Vector[Money[C]]
Extension method from Bands

The marginal charge per band, each rounded at the currency's scale by mode, as a payslip prints its deduction lines. Bands the amount never reaches charge zero, and a negative amount mirrors as the contra entry.

The marginal charge per band, each rounded at the currency's scale by mode, as a payslip prints its deduction lines. Bands the amount never reaches charge zero, and a negative amount mirrors as the contra entry.

Attributes

def gross[C <: Currency & Singleton](net: Money[C], mode: Rounding)(using c: ValueOf[C]): Money[C]
Extension method from Bands

The gross whose after-charges remainder is net, computed over rationals and rounded once at the currency's scale by mode. Total: the scale is piecewise linear and strictly increasing, so the inverse is closed form. Applying banded to the result reconstructs net exactly where the band limits sit at the rounding scale. Negative nets mirror.

The gross whose after-charges remainder is net, computed over rationals and rounded once at the currency's scale by mode. Total: the scale is piecewise linear and strictly increasing, so the inverse is closed form. Applying banded to the result reconstructs net exactly where the band limits sit at the rounding scale. Negative nets mirror.

Attributes

def gross[C <: Currency & Singleton](net: Money[C], scale: Int, mode: Rounding): Money[C]
Extension method from Bands

The same inverse at an explicit scale - the controlled form for currencies that record no minor unit, completing the family's explicit-scale pair.

The same inverse at an explicit scale - the controlled form for currencies that record no minor unit, completing the family's explicit-scale pair.

Attributes

def total[C <: Currency & Singleton](amount: Money[C], mode: Rounding)(using ValueOf[C]): Money[C]
Extension method from Bands

The marginal total: the sum of the banded charges.

The marginal total: the sum of the banded charges.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product